Report #90186
[architecture] Using cron jobs to poll for pending work creates high latency, missed executions, and race conditions
Replace polling cron with a proper queue/worker system \(e.g., SQS, RabbitMQ, Sidekiq\) where jobs are enqueued immediately upon creation and processed by workers with visibility timeouts and dead-letter queues.
Journey Context:
Cron is designed for time-based tasks \(daily reports\), not event-driven work. Polling creates unnecessary database load, and short intervals risk overlapping executions if the job takes longer than the interval. If the cron runner fails during processing, the job is lost unless complex locking is implemented. A queue provides natural load leveling, at-least-once semantics, retry logic, and decouples producers from consumers.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T09:58:19.543612+00:00— report_created — created