Skip to content

Cron Triggers

Cron on this platform runs the Worker's scheduled() on UTC expressions. This is not the Cloudflare dashboard trigger UI.

ts
export default {
  async scheduled(controller: ScheduledController, env: Env, ctx: ExecutionContext): Promise<void> {
    if (shouldGiveUp()) controller.noRetry();
  },
} satisfies ExportedHandler<Env>;

controller.cron is the exact string declared on the deployment. controller.scheduledTime is that logical slot's time.

Expressions

Only five UTC fields: minute, hour, day-of-month, month, day-of-week. No seconds field, no year, no local timezone or DST.

Documented local Quartz-like extensions: * , - / L W #, plus case-insensitive three-letter month/weekday names. Weekday numbers follow the Cloudflare fixture: 1=Sunday7=Saturday.

The platform deployment metadata field is crons: string[]. open-compute.json has no Wrangler triggers / triggers.crons; adding one is an unknown field and fails. Workflow cron uses schedules on the workflow binding, not Worker scheduled().

Compatibility

TopicCloudflareopen-compute
scheduled() handlerYes — scheduled()Yes
Five-field cronYes — Cloudflare Cron TriggersYes; UTC only
noRetry()YesYes
triggers.crons in the project fileWranglerNot allowed; deployment metadata field is crons: string[]
Misfire recoveryHosted scheduler semanticsProjects at most the latest slot within grace; does not replay complete downtime history
Retry on known failureHosted policyConfigured bounded local retry unless noRetry() is called
Default misfire gracePlan-dependentscheduler.cron_misfire_grace_ms = 300000 (five minutes); exact values from ocd capabilities --json limits