The five fields
A cron expression is a single line of five space-separated fields: minute hour day-of-month month day-of-week. The cron daemon runs the job whenever the current time matches every field at once.
| Field | Allowed values | Notes |
|---|---|---|
| Minute | 0-59 | The minute within the hour. |
| Hour | 0-23 | 24-hour clock; 0 is midnight. |
| Day of month | 1-31 | Short months skip missing dates. |
| Month | 1-12 or JAN-DEC | Names are case-insensitive. |
| Day of week | 0-7 or SUN-SAT | Both 0 and 7 mean Sunday. |
Operators
Four characters do all the work inside any field, and they combine freely (for example 1-15/3 or 0,30):
| Operator | Meaning | Example |
|---|---|---|
* | Every allowed value. | * in the minute field = every minute. |
, | A list of values. | 6,18 in hour = 06:00 and 18:00. |
- | An inclusive range. | 1-5 in day-of-week = Monday to Friday. |
/ | A step through a range. | */15 = every 15; 8-18/2 = every 2 from 8 to 18. |
30 real examples
Each pattern below is a valid five-field expression. Times use the 24-hour clock of the machine the cron daemon runs on.
| Expression | Plain-English meaning |
|---|---|
* * * * * | Every minute. |
*/5 * * * * | Every 5 minutes. |
*/10 * * * * | Every 10 minutes. |
*/15 * * * * | Every 15 minutes. |
*/30 * * * * | Every 30 minutes. |
0 * * * * | Hourly, at minute 0 (on the hour). |
15 * * * * | Every hour at 15 minutes past. |
0 */2 * * * | Every 2 hours, on the hour. |
0 */6 * * * | Every 6 hours: 00:00, 06:00, 12:00, 18:00. |
0 6,18 * * * | Twice a day, at 06:00 and 18:00. |
0 0 * * * | Every day at midnight (00:00). |
5 0 * * * | Every day at 00:05. |
0 12 * * * | Every day at noon. |
30 4 * * * | Every day at 04:30. |
* 3 * * * | Every minute during the 3 AM hour (03:00-03:59). |
0 9 * * 1-5 | At 09:00 on weekdays (Monday to Friday). |
0 9 * * MON-FRI | Same schedule, written with weekday names. |
0 9 * * 1 | At 09:00 every Monday. |
0 2 * * 0 | At 02:00 every Sunday. |
0 2 * * 7 | Identical: 7 also means Sunday. |
0 0 * * 6,0 | At midnight on Saturday and Sunday (weekends). |
0 22 * * FRI | At 22:00 every Friday. |
0 0 1 * * | At midnight on the 1st of every month. |
0 0 15 * * | At midnight on the 15th of every month. |
0 0 1,15 * * | At midnight on the 1st and the 15th. |
0 0 1 1 * | At midnight on January 1st (once a year). |
0 0 29 2 * | At midnight on February 29 (leap years only). |
*/15 9-17 * * 1-5 | Every 15 minutes from 09:00 to 17:45 on weekdays — work hours. |
0 9-17 * * * | Hourly from 09:00 through 17:00, every day. |
0 8-18/2 * * * | Every 2 hours from 08:00 to 18:00 (08:00, 10:00, ... 18:00). |
Common pitfalls
- Minute comes first.
* 9 * * *is not "9 AM daily" — it fires every minute between 09:00 and 09:59. For once a day at 9 AM use0 9 * * *. - Day-of-month and day-of-week combine with OR, not AND.
0 0 13 * 5runs on the 13th of every month and on every Friday — it does not mean "Friday the 13th". To target Friday the 13th, schedule0 0 13 * *and check the weekday inside the command itself. - The server's timezone rules, not yours. Cron uses the system local time of the machine it runs on. Check it with
dateover SSH; on hosted schedulers look for a TZ setting or aCRON_TZvariable. Around daylight-saving changes, times in the skipped hour never run, and times in the repeated hour can fire twice. - Steps do not realign.
*/7in the minute field hits 0, 7, 14 ... 56, then restarts at 0 the next hour, so the last gap is only 4 minutes. For even intervals choose steps that divide 60: 2, 3, 4, 5, 6, 10, 12, 15, 20 or 30. - Impossible dates are silently skipped.
0 0 31 * *never fires in February, April, June, September or November.
Check your expression
Try it: paste any expression from the tables above into the Cron Expression Parser — it turns the schedule into plain English, breaks down each of the five fields, and previews the next five run times in your local timezone, so you can confirm the pattern before it goes anywhere near a real crontab.