A cron line like 0 9 * * 1-5 is compact but easy to misread. This tool explains it in plain English and lists the next times it will run in your local time. It understands lists, ranges, steps, month and day names and shortcuts like @daily, so you can check a schedule does what you think before it's live.
How to use it
- Type or paste a five-part cron expression.
- Read the plain-English explanation.
- Check the upcoming run times.
- Adjust the expression until the schedule is right.
When it helps
- Checking a server job before deploying it.
- Working out what an inherited cron line does.
- Learning cron syntax.
- Debugging a job that isn't running when expected.
Good to know
- The five fields are minute, hour, day of month, month, day of week.
- When both day of month and day of week are set, cron runs on either match, which surprises people.
- Servers often run in UTC, while the times here use your browser's time zone.
Reading the five fields
A cron expression has five fields: minute (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 as Sunday). An asterisk means every value, a comma separates lists, a hyphen gives a range, and a slash gives a step, so */15 in the minute field means every fifteen minutes.
Names are accepted too, such as jan-mar or mon-fri, and shortcuts like @daily and @weekly.
Worked example: weekday mornings
The expression 0 9 * * 1-5 runs at 9:00 on Monday to Friday. The tool says so in plain English and lists the next six run times. Change the 9 to 8,17 and it runs at 8:00 and 17:00 each weekday.
The expression 0 0 1 * * runs at midnight on the first of each month, and */5 * * * * runs every five minutes.
Pitfalls
The famous trap is setting both day of month and day of week. Standard cron then runs when either matches, not both, so 0 0 13 * 5 runs on every 13th and every Friday. Another is time zones: servers often run in UTC, so 9:00 may not be 9:00 where you are.
Also be careful with jobs that take longer than their interval, since runs can overlap. Use locking or a longer interval.
Testing a schedule safely
Before deploying a cron job, read the explanation aloud and check the next run times against what you expect. Pay attention to the first run, since a job set for 0 0 1 1 * won't run until next January. Many mistakes come from swapping the minute and hour fields.
Add logging to every job, so you can see whether and when it ran, and set up alerts for jobs that fail or never start.
Questions
What does */15 mean?
Every 15 units, so in the minute field it means every 15 minutes.
Does it support seconds?
No, this is the standard five-field format.