Attach or override cron triggers on deploy

deploy & domains

// what it does

Attaches cron schedules to the deployment so the Worker's scheduled() handler fires on that cadence — cache warmers, cleanup jobs, periodic syncs. --triggers lets you set the schedule at deploy time without editing config. Test the handler locally first with wrangler dev --test-scheduled, which exposes a /__scheduled route.

// shell

$ wrangler deploy --triggers "*/5 * * * *"
$ wrangler dev --test-scheduled

// gotcha

--triggers overrides the triggers.crons from your config for this deploy, so passing a partial list can silently drop existing schedules; and a cron with no exported scheduled handler fires into nothing.