Cron Expression Explainer

Read a cron schedule in plain English. Cron expressions are compact and easy to misread, and the cost of a misreading is a job running a thousand times more often than intended.

Field reference

PositionFieldRange
1Minute0-59
2Hour0-23
3Day of month1-31
4Month1-12 or JAN-DEC
5Day of week0-6 or SUN-SAT (0 and 7 both mean Sunday)

Special characters: * every value, , a list, - a range, " / a step. So */15 in the minute field means every fifteen minutes.

Common expressions

ExpressionMeaning
* * * * *Every minute
*/5 * * * *Every five minutes
0 * * * *Hourly, on the hour
0 0 * * *Daily at midnight
0 9 * * 1-509:00 on weekdays
0 0 1 * *Midnight on the first of the month

The day-of-month and day-of-week trap

When both the day-of-month and day-of-week fields are restricted, cron treats them as OR, not AND. 0 0 13 * 5 does not mean "Friday the 13th" — it fires on the 13th of every month and on every Friday. This surprises nearly everyone the first time, and it is why schedules occasionally run far more often than their author expected.

All developer tools