TL;DR: The scheduled handler receives the cron expression it fired on; use it to route multiple schedules. ## 2. # Workflow: scheduled background work ## 1. Cron Triggers for schedules Declare crons in the Wrangler file.

## Fix
1. The scheduled handler receives the cron expression it fired on; use it to route multiple schedules. ## 2.
   Expected: this specific failure stops.
2. Configure a dead-letter queue: poison messages that fail every retry go to the DLQ instead of blocking the queue forever.
   Expected: this specific failure stops.
3. Make consumers idempotent: keyed writes, dedupe on message id.
   Expected: this specific failure stops.

## Details
# Workflow: scheduled background work ## 1. Cron Triggers for schedules Declare crons in the Wrangler file. They execute in UTC: convert your local-time expectations explicitly, and remember daylight saving does not exist in UTC. Keep the handler light A cron handler that does heavy work inline risks the CPU limit (1102) and blocks the schedule. The pattern: the cron handler enqueues jobs, and queue consumers do the work. ## 3. Queues for the work Producers send messages; consumers process with automatic retries. Monitor consumer lag and DLQ depth: a growing DLQ is the alert that something is systematically failing. ## 4. Idempotency Cron can fire a handler more than once in edge cases, and queue retries redeliver. "At least once" is the delivery contract; exactly-once is your code's job. ## 5. Observability Log from the scheduled handler (which cron fired, how many jobs enqueued) and from consumers (processed, failed, DLQed). Tail during the first few production fires. ## Checklist - Crons in UTC, handler enqueues, queues do the work. - DLQ configured and monitored from day one. - Consumers idempotent; retries are normal, not exceptional.

## When to use
You hit exactly this: Workflow: scheduled background work with Cron Triggers and Queues in Workflow.

## When not to use
A different error, or the same symptom in a different tool. This page only covers the failure above.

## Compatibility
Workflow.