basics standard reference

How Cron Expressions Work: A Complete Field Reference

by Sinthuyan  · April 1, 2026

A cron expression is a compact string that tells a scheduler when to run a job. Standard cron expressions have five space-separated fields, evaluated every minute by the cron daemon. When all five fields match the current time simultaneously, the job executes.

The Five Fields

Reading left to right, the fields are: minute, hour, day-of-month, month, and day-of-week. Each field has a valid numeric range, and each can hold a literal value, a wildcard, or a special character.

PositionFieldRangeNotes
1Minute0–590 = top of the hour
2Hour0–2324-hour clock, UTC by default
3Day-of-month1–31Months with fewer days skip higher values
4Month1–12 or JAN–DECThree-letter abbreviations are case-insensitive
5Day-of-week0–7 or SUN–SATBoth 0 and 7 represent Sunday

Special Characters

Special characters let you express patterns beyond single values:

  • * — matches every value in that field (wildcard)
  • , — separates a list of values: 1,15,30 in minute = at minutes 1, 15, and 30
  • - — defines a range: 9-17 in hour = every hour from 9am through 5pm inclusive
  • / — defines a step: */15 in minute = every 15 minutes; 10/5 = at 10, 15, 20, 25…
  • ? — "no specific value" — Quartz scheduler only; used in either DOM or DOW when the other is set
  • L — "last" — Quartz only; L in DOM = last day of the month
  • W — "nearest weekday" — Quartz only; 15W = the weekday nearest the 15th
  • # — "nth occurrence" — Quartz only; 2#1 in DOW = first Monday of the month

Practical Examples

  • 0 2 * * * — runs at 2:00 AM every day
  • */15 * * * * — runs every 15 minutes (at :00, :15, :30, :45)
  • 0 9 * * 1-5 — runs at 9:00 AM Monday through Friday
  • 0 0 1 * * — runs at midnight on the first day of every month
  • 30 6 * * 1 — runs at 6:30 AM every Monday

How the Scheduler Evaluates

The cron daemon wakes up every minute and checks whether the current time matches all five fields simultaneously. An asterisk in a field never blocks a match — it always passes. Every other character narrows the match.

For example, 0 9 * * 1-5 matches when: minute is exactly 0, hour is exactly 9, any day of the month, any month, and the weekday is Monday through Friday. At 9:00 AM on a Saturday, the DOW field fails to match, so the job does not run.

Common Misconception: Step Values

The expression */5 in the minute field does not mean "every 5 minutes from the last run." It means "at minute 0, 5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55" — regardless of when the job last executed or when the daemon started. This distinction matters when a job takes variable time to complete: cron does not track elapsed time between runs, only absolute clock positions.

Standard vs Extended Dialects

Standard Unix cron (Vixie cron, cronie) uses exactly five fields. Extended dialects add fields: Quartz Scheduler prepends a seconds field and appends an optional year field (making it 6–7 fields total). AWS EventBridge appends a mandatory year field. Jenkins adds the H hash symbol. Always confirm the dialect your scheduler expects before writing expressions — a 5-field expression in a 6-field context shifts every field right by one, silently changing execution times.

Related Guides