Cron Syntax Reference

The complete rules for writing a five-field cron expression — fields, ranges, special characters, and the pitfalls that trip people up.

The five fields

A cron expression is five fields separated by spaces, read left to right:

minute  hour  day-of-month  month  day-of-week
FieldAllowed valuesExampleMeaning
Minute0–5930at minute 30
Hour0–239at 09:00
Day of month1–311on the 1st
Month1–124in April
Day of week0–7 (0 and 7 = Sunday)1on Monday

Special characters

SymbolMeaningExampleExpands to
*Any value* * * * *Every minute
,List of values0 9 * * 1,3Mon & Wed at 09:00
-Inclusive range0 9-17 * * *Every hour from 09:00 to 17:00
/Step*/15 * * * *Every 15 minutes
/Step over a range0 8-18/2 * * *Every 2 hours from 08:00 to 18:00

The slash means “step”. */n is a step over the whole field (starting at its minimum), while a-b/n steps through the range a to b.

Common pitfalls

Day of month and day of week are an “OR”

When you restrict both the day-of-month and the day-of-week fields, cron treats them as an OR, not an AND. 0 0 13 * 5 means “run at midnight on the 13th of the month, and also every Friday” — not just Friday the 13th. If you want only one of them, leave the other as *. This surprises almost everyone at least once.

Sunday is 0 and 7

The day-of-week field runs 0–7. Both 0 and 7 represent Sunday; CronHelp normalizes 7 to 0 internally. So 0 9 * * 0 and 0 9 * * 7 mean exactly the same thing.

Timezone is local to the machine

Cron fires in the timezone of the machine running it. A server set to UTC will run 0 3 * * * at 03:00 UTC, which may be 11:00 in your own timezone. The previews on this site are shown in your browser’s local timezone — always double-check the server’s clock when scheduling across regions.

No day zero, no “L”, “W”, “?”, or “#”

The five-field format supported here is the classic numeric cron syntax. Day-of-month starts at 1 (there is no 0), and non-standard extensions such as L (last), W (weekday), ?, #, and month or weekday name abbreviations like JAN or MON are not supported — they will be reported as invalid.

Putting it together

Reading a cron expression is just a matter of walking the fields left to right and asking one question per field: “which minutes, which hours, which days of the month, which months, which days of the week?” The answer to each question can be a single number, a list, a range, a step, or “any”.

The easiest way to get comfortable is to test as you learn. Paste any expression into the interpreter and it will show you the expanded values for each field, so you can confirm your mental model instantly — for example, that */15 expands to 0, 15, 30, 45, or that 1-5 in the day-of-week field means Monday through Friday.

When you want a ready-made schedule instead of writing one from scratch, the common expressions library has two dozen curated patterns, and the next-run previewer will show exactly when a schedule fires with a live countdown.