> queues & cron
Cloudflare Queues decouple producer Workers from consumers for reliable async work, while Cron Triggers run a Worker's scheduled() handler on a timer. These commands cover creating queues, wiring producer and consumer Workers, scheduling and locally testing cron jobs, and draining a backlog when a bad deploy floods the queue.
// queues & cron
6 commands$ wrangler queues create <name>$ wrangler queues consumer add <queue-name> <script-name>$ # wrangler.jsonc: "triggers": { "crons": ["0 */6 * * *"] }$ wrangler dev --test-scheduled$ wrangler queues pause-delivery <name>$ wrangler queues list// faq
Why doesn't my Cron Trigger fire when I run wrangler dev?
Cron Triggers only run against a deployed Worker — local dev never fires them on a schedule. Run wrangler dev --test-scheduled and hit the /__scheduled endpoint to invoke your scheduled() handler on demand.
Can one queue have multiple consumer Workers?
No — a queue is consumed by a single Worker at a time. To fan work out, have that consumer dispatch to other queues or Workers. Producers, on the other hand, can be many.
What timezone do Cron Triggers use?
Always UTC. A schedule like "0 9 * * *" runs at 09:00 UTC regardless of your account or local timezone, so convert your intended time before writing the expression.