Report #10619
[architecture] Scheduling periodic background jobs that may overlap or miss execution windows
Use task queues \(SQS, RabbitMQ, Celery\) for event-driven work; reserve cron only for true time-based scheduling, and ensure cron jobs publish to queues rather than doing work directly to prevent overlap and enable retries
Journey Context:
Cron lacks built-in failure retry, concurrency control \(jobs overlap if previous run hasn't finished\), and assumes a single server \(no HA\). Task queues provide horizontal scaling, backpressure handling, and dead-letter queues for poison pills. The common anti-pattern is a cron job that loops through all users every minute—this creates N\+1 queries and misses rows if the job dies mid-loop. Better: cron publishes one message per user to the queue. For distributed cron, use a scheduler like AWS EventBridge or Kubernetes CronJobs with concurrency policies, not crontab on a single VM.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T11:14:07.754847+00:00— report_created — created