How to Read and Understand Cron Expressions

17 Jun 2026 1,435 words

How to Read and Understand Cron Expressions

A cron expression is a string of five or six fields that describes a recurring schedule. Once you learn the pattern, you can read any cron expression like plain English. This guide teaches you to decode every cron syntax element, from simple * * * * * to complex expressions with ranges, steps, and special characters.

The Five Fields of Cron

Every cron expression has five time fields followed by the command:

┌───────── Minute (0-59)
│ ┌──────── Hour (0-23)
│ │ ┌─────── Day of Month (1-31)
│ │ │ ┌────── Month (1-12)
│ │ │ │ ┌───── Day of Week (0-7, 0 and 7 = Sunday)
│ │ │ │ │
* * * * * <command>

Reading from left to right: "At what minute, on what hour, on which day of the month, in which month, and on which day of the week?"

Reading Expressions Step by Step

Simple Examples

0 9 * * *

Read as: "At minute 0, at hour 9, every day of the month, every month, every day of the week." → Runs daily at 9:00 AM.

*/15 * * * *

Read as: "Every 15 minutes of every hour, every day." → Runs every 15 minutes.

30 8 * * 1-5

Read as: "At minute 30, at hour 8, every day of the month, every month, Monday through Friday." → Runs weekdays at 8:30 AM.

0 0 1 * *

Read as: "At midnight on the first day of every month." → Runs monthly.

Complex Examples

0 9-17/2 * * 1-5

Breaking it down:

  • 0 — at minute 0
  • 9-17/2 — every 2 hours from 9 to 17 (i.e., 9, 11, 13, 15, 17)
  • * — every day of month
  • * — every month
  • 1-5 — Monday to Friday

→ Runs at 9:00, 11:00, 13:00, 15:00, and 17:00 on weekdays.

30 6 1,15 * 0

Breaking it down:

  • 30 — at minute 30
  • 6 — at hour 6
  • 1,15 — on day 1 and day 15 of the month
  • * — every month
  • 0 — on Sunday only

→ Runs at 6:30 AM on the 1st and 15th of the month, only if those days are also Sundays.

Special Characters Reference

* — Every / All

Matches any value for that field.

0 * * * *     → "Every hour"
* * * * *     → "Every minute"

, — List / Or

Separates multiple values.

0 9,12,15 * * *     → "At 9 AM, 12 PM, and 3 PM"

- — Range

Defines an inclusive range of values.

0 9-17 * * *        → "Every hour from 9 AM to 5 PM"
30 8 * * 1-5        → "Weekdays at 8:30 AM"

/ — Step

Divides the field into increments.

*/15 * * * *        → "Every 15 minutes"
0 */2 * * *         → "Every 2 hours"
0 0 */3 * *        → "Every 3 days"

Steps can be combined with ranges:

0 9-17/2 * * *     → "Every 2 hours from 9 AM to 5 PM"
30 */4 * * 1-5     → "Every 4 hours on weekdays, at minute 30"

L — Last (some systems)

In some cron implementations (like Quartz), L means "last."

0 0 L * *          → "Last day of every month"

# — Nth occurrence (some systems)

0 9 * * 1#1        → "First Monday of every month at 9 AM"

Common Expressions Decoded

Expression Human Readable Description
* * * * * Every minute
*/5 * * * * Every 5 minutes
0 * * * * At minute 0 of every hour Hourly
0 */2 * * * Every 2 hours
0 9 * * * Every day at 9 AM Daily
0 9,17 * * * Every day at 9 AM and 5 PM
0 9 * * 1-5 Weekdays at 9 AM
30 8 * * 1 Mondays at 8:30 AM
0 0 1 * * First of every month Monthly
0 0 1 1 * January 1st at midnight Yearly
*/15 9-17 * * 1-5 Every 15 min during business hours on weekdays
0 0 * * 0 Every Sunday at midnight Weekly
0 0 */2 * * Every other day at midnight
0 22 * * 5 Every Friday at 10 PM

Six-Field Cron (With Seconds)

Some cron implementations (like Quartz Scheduler) use six fields, adding seconds at the beginning:

┌───────── Second (0-59)
│ ┌──────── Minute (0-59)
│ │ ┌─────── Hour (0-23)
│ │ │ ┌────── Day of Month (1-31)
│ │ │ │ ┌───── Month (1-12)
│ │ │ │ │ ┌──── Day of Week (0-7)
│ │ │ │ │ │
* * * * * * <command>
0 */5 * * * *     → "Every 5 minutes, at second 0"
0 0 9 * * *       → "Every day at 9:00:00 AM"

Non-Standard Shorthands

Many cron implementations support these aliases:

@yearly   → 0 0 1 1 *     → "Once a year"
@monthly  → 0 0 1 * *     → "Once a month"
@weekly   → 0 0 * * 0     → "Once a week"
@daily    → 0 0 * * *     → "Once a day"
@hourly   → 0 * * * *     → "Once an hour"
@reboot   → (not a time)   → "Run at startup"

Translating Cron to Human Readable

When you see an unfamiliar cron expression, decode it field by field:

Expression: 45 17 1,15 * 1-5
Field Value Meaning
Minute 45 At minute 45
Hour 17 At 5 PM
Day of Month 1,15 On the 1st and 15th
Month * Every month
Day of Week 1-5 Monday to Friday

Result: "At 5:45 PM on the 1st and 15th of every month, only if those days are weekdays."

Expression: 0 0 * * 0
Field Value Meaning
Minute 0 At midnight
Hour 0 At 0 (midnight)
Day of Month * Every day
Month * Every month
Day of Week 0 Sunday

Result: "Every Sunday at midnight."

Common Pitfalls When Reading Cron

Pitfall 1: * in day-of-week AND day-of-month means both match

When both day-of-month and day-of-week are *, the expression runs on any day. But when both have specific values, the job runs if EITHER matches — it is an OR condition.

0 9 15 * 1

This runs at 9 AM on the 15th of the month AND on every Monday (not "the 15th AND Monday"). To run only when both match, you need two separate crontab entries or script-level logic.

Pitfall 2: Cron uses local time, not UTC

Cron uses the system's local time. On servers configured to UTC, 0 9 * * * runs at 9 AM UTC. Always verify the server timezone before setting schedules.

Pitfall 3: 0 and 7 are both Sunday

In the day-of-week field, both 0 and 7 represent Sunday. This is a legacy from early Unix implementations.

Online Tool

The Cron Expression Parser tool on Help2Code decodes any cron expression into a human-readable description. Paste an expression like */15 9-17 * * 1-5 and see a field-by-field breakdown, next run times, and a plain-English explanation. Build new expressions with the Cron Job Command Generator tool.

Conclusion

Reading cron expressions is a skill that becomes second nature with practice. Remember the five fields: minute, hour, day-of-month, month, day-of-week. Use the wildcard * for "every," ranges with - for spans, steps with / for intervals, and lists with , for specific values. Decode any unfamiliar expression field by field, and use the Cron Expression Parser tool to verify your understanding.


About this article

Learn how to read and understand cron expressions. Decode any crontab schedule with our expression parser and master special characters, ranges, and steps.


Related Articles


Related Tools

Help2Code Logo
Menu