Cron Triggers in Cloudflare Workers
Cloudflare Workers run on a schedule via cron triggers declared in wrangler.toml. The Worker exposes a scheduled() handler that fires at each cron time. All cron triggers run in UTC.
Declare the trigger
In wrangler.toml:
[triggers]
crons = ["*/30 * * * *"]
This runs the Worker every 30 minutes.
The handler
Export a scheduled handler: export default { async scheduled(event, env, ctx) { /* work */ } }. The event.cron field tells you which trigger fired when you have several.
UTC only
Cloudflare cron triggers are always UTC — there is no timezone option. Convert your local time to UTC when writing the expression. Test locally with wrangler dev --test-scheduled.
FAQ
How do I schedule a Cloudflare Worker?
Add crons = ["*/30 * * * *"] under [triggers] in wrangler.toml and export a scheduled() handler in your Worker.
What timezone do Cloudflare cron triggers use?
Always UTC. There is no timezone setting, so convert your local schedule to UTC in the cron expression.
How do I test a Cloudflare cron trigger locally?
Run wrangler dev --test-scheduled and hit the /__scheduled endpoint, or use wrangler's scheduled test to fire the handler on demand.