Register an OS-level cron job that runs a JavaScript/TypeScript module on a schedule.
The module must export a default object with a scheduled(controller) method, conforming to the Cloudflare Workers Cron Triggers API.
On Linux, registers with crontab. On macOS, registers with launchd. On Windows, registers with Task Scheduler.
Cron expression syntax (5 fields: minute hour day month weekday):
| Field | Values | Special |
|---|---|---|
| Minute | 0-59 | * , - / |
| Hour | 0-23 | * , - / |
| Day of month | 1-31 | * , - / |
| Month | 1-12 or JAN-DEC | * , - / |
| Day of week | 0-7 or SUN-SAT | * , - / |
0and7both mean Sunday in the weekday field.- Month/day names are case-insensitive (
MON,Mon,Mondayall work). - Predefined nicknames:
@yearly,@annually,@monthly,@weekly,@daily,@midnight,@hourly. - When both day-of-month and day-of-week are specified (neither is
*), the job runs when either field matches (POSIX cron behavior).