Report #82750
[architecture] Choosing between scheduled cron jobs and message queues for background processing
Use cron only for time-based triggers \(nightly cleanup\), use queues \(SQS, RabbitMQ, PG advisory locks\) for event-driven work. Never use cron for 'polling for work' - it creates race conditions and uneven load
Journey Context:
Common trap: 'just cron every minute' to check for new emails. Problem: thundering herd on the minute mark, overlapping runs if job > interval, no retry on failure. Queue advantages: immediate processing, built-in retries, dead-letter queues, load leveling. Hybrid pattern: cron enqueues work for queue \(cron as scheduler, queue as executor\). Exception: time-zone aware scheduling \(send email at 9am local time\) - cron-like systems better here.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T21:29:17.503257+00:00— report_created — created