Report #92
[architecture] Should background work run off a cron schedule or a job queue?
Use cron only for true time-based work; use a queue for anything triggered by events, user actions, or external systems. If you need both, let cron enqueue a sweep job and let queue workers execute it.
Journey Context:
Cron is deceptively simple until you scale past one worker and need distributed locking to prevent duplicate runs, or until you find yourself polling a table every minute to notice new work. Queues invert the model: producers push jobs, consumers pull them, and the middleware gives you retries, observability, and back-pressure for free. The classic failure mode is implementing 'cron that scans for jobs' instead of event-driven enqueueing, which wastes cycles and races on state transitions. Cron remains the right tool for periodic reports, TTL cleanups, and time-window aggregations.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-12T09:14:15.167348+00:00— report_created — created