Report #103457
[architecture] Should I use a cron job or a queue for recurring background work?
Use cron only for time-triggered, idempotent, best-effort tasks \(report generation, cleanup\). Use a queue/scheduler when work is event-triggered, must happen exactly once, or failure must be retried with backoff. A job queue gives you per-task observability, retries, and decoupled scaling; cron gives you a clock.
Journey Context:
Teams often start with cron because it is familiar, then discover missed executions pile up silently, overlapping runs race, and retry logic has to be reinvented in shell scripts. A queue makes every work item a durable record: you can inspect pending/failed/dead-letter jobs, scale workers independently, and rerun a single failed item without re-running the whole batch. The tradeoff is operational complexity—you need a broker \(Redis/RabbitMQ/SQS\) or a Postgres-backed job library. Cron remains correct for purely time-based housekeeping where exact-once is unnecessary and you do not want to operate another service.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-07-11T04:26:14.669211+00:00— report_created — created