Cron expressions schedule automatic jobs: backups, reports, cleanups. They look like a row of numbers and stars, and they confuse almost everyone at first. This guide teaches you to read one in plain English.
The five fields
A standard cron expression has five fields, in this order: minute, hour, day of the month, month, day of the week. So “30 9 * * 1” means minute 30, hour 9, any day of the month, any month, day 1 of the week, which is Monday. The job runs at 9:30 every Monday.
Some systems add a sixth field for seconds at the front, and some add a year at the end. Check your system’s format before reading, or every field will shift by one.
The symbols, one by one
- * means every value. A star in the hour field means every hour.
- , lists values. “1,15” in the day field means the 1st and 15th.
- – gives a range. “9-17” in the hour field means 9 through 17.
- / gives a step. “*/15” in the minute field means every 15 minutes.
- Names work too in many systems: JAN, MON, and so on.
Step-by-step: read any cron expression
- Split it into five fields and label each one.
- Translate each field separately into words.
- Read the fields together as one sentence.
- Check the day fields carefully: this is where the famous trap lives.
The day-of-month versus day-of-week trap
When both day fields are restricted, cron runs the job when EITHER matches, not both. “0 0 15 * 1” runs on the 15th of the month AND on every Monday, not only on Mondays that are the 15th. This surprises almost everyone, and it causes more scheduling bugs than any other cron feature. If you need both conditions, you must check the second one inside the job itself.
Timezone trouble
Cron runs in the server’s timezone, not yours. A job set for 9:00 on a server in another timezone runs at a different hour for you. Always confirm which timezone the server uses, and remember daylight saving changes can shift the job by an hour twice a year.
Try it the faster way
Paste any cron expression into the tool below to get its plain-English meaning.
Prefer the full page? Open the cron expression descriptor directly.
Quick tips
- Read cron expressions field by field, left to right, never as a whole.
- Test a new schedule with the next few run times before relying on it.
- Write the plain-English meaning in a comment next to every cron line you create.
Once you can read the five fields and remember the day-field trap, no cron expression will puzzle you again.
Frequently asked questions
What does */15 in the minute field mean? It means every 15 minutes: at minutes 0, 15, 30, and 45 of every hour. The slash sets a step size, and the star sets the range to every possible value. Similarly, 0-30/10 means every 10 minutes within the first half hour.
Why did my job run on more days than I expected? Almost always the day-field trap: when both day of month and day of week are restricted, cron runs when either matches. If you set the 15th and Monday, you get the 15th plus every Monday. Restrict only one day field, and handle the other condition inside the job.
Do cron schedules follow daylight saving changes? They follow the server’s local time, so a job scheduled for 2:30 may run twice or not at all on clock-change days, depending on the system. For critical jobs, run them in UTC or at a time far from the changeover hour.
