Report #68231
[architecture] Using cron jobs for frequent or overlapping background tasks causing missed executions or resource contention
Use a message queue \(Redis/RabbitMQ/SQS\) for event-driven background jobs; reserve cron only for strictly time-based schedules \(daily reports\) with idempotent runtimes under 1 minute, never for high-frequency or overlapping work
Journey Context:
Cron appears simpler but fails at distributed scale: overlapping executions \(distributed locking is hard\), missed runs during downtime \(no queue\), and no retry logic. 'At-least-once' delivery requires a queue. Use cron only when the trigger is purely temporal \(e.g., 'every day at 3 AM'\), not event-driven. For overlapping protection, use distributed locks \(Redis Redlock\) with cron, but prefer queue workers with idempotency. The 'Unix philosophy' of cron breaks down when you need observability, retry, and horizontal scaling. Teams often cronify what should be queues, causing silent failures when jobs overrun their interval.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T21:00:34.416784+00:00— report_created — created