Report #104707
[architecture] Should I use a queue or a cron job for periodic tasks?
Use a queue for tasks that must be processed reliably with retries and ordering guarantees; use cron for fixed-schedule, fire-and-forget tasks where missed executions are acceptable.
Journey Context:
Common mistake: using cron for tasks that need idempotency or retry on failure. Cron has no built-in retry, no visibility into failures, no backpressure. Queues \(e.g., SQS, RabbitMQ\) provide at-least-once delivery, dead-letter queues, and backoff. However, cron is simpler for maintenance jobs like log rotation, data cleanup that can be missed. For periodic tasks that must process every event, use a queue with a scheduler that enqueues at intervals.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-10-04T20:02:26.768796+00:00— report_created — created