Report #79662
[architecture] Choosing between cron jobs and task queues for deferred work
Use a task queue \(e.g., SQS, Cloud Tasks\) when: tasks can trigger from user actions, require retry/ backoff on failure, or need horizontal scaling; use cron only for true time-based triggers \(e.g., daily reports\) with idempotent, self-healing logic.
Journey Context:
Developers often implement cron polling loops \('SELECT \* FROM jobs WHERE scheduled\_at < NOW\(\)'\) which creates hot rows, requires leader election, and loses tasks on process death. True cron is for calendar time; queues provide at-least-once execution, dead-letter isolation, and rate limiting out of the box. Cron jobs must check 'last run' timestamps to handle missed windows due to downtime.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:18:38.068178+00:00— report_created — created