How to read a cron expression
- Type or paste the expression, for example
*/15 9-17 * * MON-FRI. - Read the plain English sentence at the top of the result.
- Check the next 5 runs underneath to confirm the schedule does what you expect. Use the option at the top to see them in your local time or in UTC.
If the expression is not valid, the tool tells you which field is wrong.
What the five fields mean
A cron expression has five fields separated by spaces, in this order: minute (0 to 59), hour (0 to 23), day of month (1 to 31), month (1 to 12 or JAN to DEC) and day of week (0 to 7 or SUN to SAT, where both 0 and 7 mean Sunday).
Each field accepts a few forms:
*means every value.5,10,15is a list.9-17is a range.*/10is a step: every 10th value.5-30/5is a step inside a range.- Names such as
JANorMONcan replace numbers in the month and weekday fields.
Shortcuts like @hourly, @daily, @weekly, @monthly and @yearly are expanded to the matching five fields.
Next run times
The sentence comes from the cronstrue library. The next run times are calculated by a small parser written for this tool. It walks forward day by day, so it handles month lengths and leap years correctly: a job set for February 29 is shown in the next leap year, and a job set for the 31st skips short months. If a schedule can never run, such as February 31, the tool says so.
Tips
- A job with both day of month and day of week set runs on either, which surprises many people.
0 0 1 * 1runs on the 1st and on every Monday. - Servers usually run cron in UTC. Check the time zone of your machine before you rely on a local hour.
- Avoid
* * * * *for heavy jobs. It runs every minute. - Daylight saving time can skip or repeat an hour in local time. UTC does not.
- Convert the run times to epoch values with the Unix timestamp converter, or test log patterns with the regex tester.
The tool runs in your browser, and nothing is uploaded.