Cron Expression Builder
- Start from a preset if one comes close to what you need.
- Adjust the five fields: minute, hour, day of month, month and day of week.
- The plain-language description updates with every change — use it to check the expression does what you think.
- Copy the finished expression into your crontab, CI or scheduler.
The order is always minute, hour, day of month, month, day of week. Minute runs 0 to 59, hour 0 to 23, day of month 1 to 31, month 1 to 12 and day of week 0 to 6, with 0 being Sunday.
An asterisk means "every value". A comma lists specific values, such as 1,15. A hyphen sets a range, such as 1-5. A slash sets a step, such as */15 for "every 15".
A frequent mistake is writing */5 in the hour field expecting "every 5 minutes". In that field it means "every 5 hours".
When both fields hold something other than an asterisk, most cron implementations combine them with OR, not AND.
So 0 0 1 * 1 does not mean "every Monday that falls on the 1st". It means "every 1st of the month AND every Monday" — far more runs than expected.
If you need a joint condition, leave one of the two fields as an asterisk and perform the remaining check inside the script itself.
Cron runs in the server time zone, not yours. A job scheduled for 9am runs at the server 9am, which may be a different hour for you.
Daylight saving creates two awkward cases: on the day the clock jumps forward, a job scheduled in the skipped hour may not run; on the day it falls back, it may run twice. Critical jobs are usually scheduled in UTC to avoid this.
Worth remembering: cron guarantees nothing. If the machine is off at the scheduled time, that occurrence is simply lost.
Frequently asked questions
Use */5 in the first field: */5 * * * *. The slash is the step operator and applies to the field it appears in.
The standard convention is 0. Several implementations also accept 7 for Sunday, but 0 is the safe value in any environment.
Most likely you filled in both day of month and day of week. Most implementations combine them with OR, adding runs rather than restricting them.
They are shortcuts. @daily equals 0 0 * * *, @hourly equals 0 * * * *, @weekly equals 0 0 * * 0 and @monthly equals 0 0 1 * *. Not every scheduler accepts them, but Unix cron does.
The time zone of the server where cron is configured. To avoid daylight saving surprises, many teams standardise their servers on UTC.