Cron expressions: reading and building schedules
The five fields, the day-of-month and day-of-week quirk, and how to check a schedule before it runs in production.
A cron schedule looks cryptic until you know that it is simply five fields read from left to right. Most production incidents caused by "the job did not run" come from one of three mistakes: the wrong time zone, the day-of-month and day-of-week rule, or a schedule that is valid but never matches.
The five fields
From left to right: minute, hour, day of month, month, and day of week. Each field accepts a value, a range (1-5), a list (1,3,5), or a step (*/15). A star matches every value in that field.
So 0 9 * * 1 means "at 09:00 every Monday" and */15 * * * * means "every fifteen minutes". Use Cron expression builder to assemble a schedule from fields and see which values match.
The day-of-month and day-of-week quirk
These two fields are not combined with AND. When both are restricted, cron matches when either one matches. So 0 0 1 * 1 runs at midnight on the first of the month and on every Monday, not only on Mondays that are also the first. If you need that intersection, schedule the job and check the date inside the job itself.
Time zones and daylight saving
Cron uses the system time zone. Around a daylight saving transition, a fixed hour can occur twice or not at all, so jobs near 02:00 are the ones that misbehave. Running schedules in UTC removes the ambiguity, at the cost of translating to local time when you reason about them.
Cron next-run preview lists the upcoming UTC runs for a numeric expression, which is the quickest way to confirm that today's date really is included.
A pre-deployment check
- Build the expression and read the plain-language summary.
- Preview the next runs and confirm the weekdays and dates.
- Decide explicitly whether local time or UTC is intended, and write that decision down where the schedule lives.
- Make jobs idempotent, so a double run around a clock change is harmless.
For scheduled work on Cloudflare Workers, remember that cron triggers are defined in UTC in the deployment configuration, which makes the preview here directly applicable.
