Report #4060
[architecture] Choosing between scheduled jobs and event-driven queues for deferred processing
Use a message queue \(SQS/RabbitMQ\) for user-triggered async work \(emails, image processing\); use cron only for time-based domain events \(billing cycles, nightly reports\) not triggered by user actions.
Journey Context:
Teams often abuse cron with "polling patterns" - checking DB every minute for new work. This creates unnecessary load, delayed processing \(average 30s latency\), and race conditions. Queues provide immediate processing, natural backpressure, and decoupling. Tradeoff: queues add infrastructure complexity \(dead letter handling, poison pills\). Cron is simpler for truly temporal logic.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T18:45:26.654692+00:00— report_created — created