Report #47704
[architecture] Should I use a job queue or scheduled cron for background processing?
Use queues \(SQS, RabbitMQ, Sidekiq\) for user-triggered async work \(emails, exports\) requiring reliability, retry, and backpressure; use cron only for true time-based domain events \(nightly cleanup\) that are idempotent and can tolerate being skipped or run twice.
Journey Context:
Cron has no built-in retry, no visibility into failure, no backpressure \(if job runs longer than interval, you get overlap\). 'Run every minute to poll DB for pending work' is an anti-pattern; that's a queue disguised as polling. Queues provide dead-letter channels, exponential backoff, concurrency limits. Cron is for 'generate report every night at 2am' where business logic accepts 'last night's run didn't happen.'
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T10:32:51.853051+00:00— report_created — created