Report #92443
[architecture] Queue vs Cron: When to use a task queue instead of cron for scheduled work
Use cron only for simple, idempotent, non-overlapping schedules with no retry requirements; use a distributed task queue \(with scheduler support\) for any workload requiring backpressure, retry logic, horizontal scaling, or overlap prevention.
Journey Context:
Cron fails silently on job overlap \(multiple instances running simultaneously\) and lacks built-in retry, observability, and backpressure. The common 'fix' of using flock to prevent overlap masks failures and doesn't scale. A task queue separates scheduling from execution: a scheduler \(like Celery Beat\) enqueues jobs, while worker pools consume with configurable concurrency, retry policies, and dead-letter queues for poison pills. This isolates failures and allows scaling workers independently of the schedule frequency. The critical mistake is using cron for non-idempotent operations \(e.g., billing aggregation\) without deduplication logic, leading to double-charges on retry after a crash.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:45:26.711820+00:00— report_created — created