How to use the Cron Expression Parser
- Type or paste the expression, or pick one of the examples. Shortcuts such as @daily and @hourly are accepted.
- Read the description and the field table to confirm each part means what you intended.
- Check the next runs. The start time defaults to now in UTC; change it to see runs from another date.
- Copy the list of runs if you want to share it.
The five fields
A classic cron expression has five fields separated by spaces: minute (0-59), hour (0-23), day of month (1-31), month (1-12 or jan-dec) and day of week (0-7, where 0 and 7 are both Sunday, or sun-sat). The job runs at every minute that matches all the fields.
Inside a field you can use * for every value, a comma list (1,15), a range (1-5), a step after a range or asterisk (*/15 or 0-30/10), and a combination such as 1-5,10,20-30/5. A step counts inside its own field only, so */23 in the hour field means hours 0 and 23, not "every 23 hours".
Day of month and day of week together
When both the day-of-month and the day-of-week fields are restricted (neither contains an asterisk), the command runs when either one matches. So 0 0 13 * 5 runs at midnight on every 13th and on every Friday, not only on Friday the 13th. If one of them is *, only the other one limits the days.
Examples
*/15 * * * * runs every 15 minutes. 0 9 * * 1-5 runs at 09:00 on weekdays. 30 2 * * 0 runs at 02:30 on Sunday. 0 0 1 * * runs at midnight on the first of each month. @daily is the same as 0 0 * * *.
This tool lists run times in UTC. A real cron daemon uses the time zone of the machine it runs on (or the zone you configure), so a 09:00 job on a server set to another zone fires at a different UTC time.
Frequently asked questions
What does */5 * * * * mean?
It runs every five minutes: at minutes 0, 5, 10 and so on up to 55 of every hour.
How do I run a job every weekday at 9 AM?
Use 0 9 * * 1-5. The 0 is the minute, 9 the hour, the two asterisks mean every day of month and every month, and 1-5 is Monday to Friday.
Why does my job run on days I did not expect?
If both the day-of-month and day-of-week fields are restricted, cron runs the job when either matches. Leave one of them as * if you want only the other to apply.
Is 0 or 7 Sunday?
Both. In the day-of-week field 0 and 7 mean Sunday, so 1-7 and 0-6 each cover a full week.
Does this support seconds or a year field?
No. It reads the standard five-field format. Some schedulers add a seconds field or use different syntax, so check what your scheduler expects.
Sources
Last reviewed