All tools

Cron Expression Explainer

Converters

Read any cron expression in plain English and see exactly when it runs next — for Unix cron, GitHub Actions, Kubernetes CronJobs and Quartz.

  • Cron
  • Date & Time
  • Runs offline
Dialect
Valid
Every 15 minutes, from 09:00 to 17:59 on Monday through Friday.
minute*/15every 15 minutes
hour9-17hours 9 through 17
day of month*any day
month*every month
day of week1-5Monday through Friday
Next 10 runs
#UTCUTCWhen
Build an expression
Crontab line
*/15 9-17 * * 1-5  /usr/local/bin/my-job.sh

What a cron expression is

A cron expression is a schedule written as five fields separated by spaces: minute, hour, day of the month, month and day of the week. Each field says which values match — * for any, a number, a list, a range or a step — and the job runs every minute at which all of them match.

FieldValuesExamples
Minute0–590, */15, 0,30
Hour0–239, 9-17, */2
Day of month1–311, 1,15, L (Quartz: last day)
Month1–12 or JAN–DEC1, JAN-MAR, */3
Day of week0–6 or SUN–SAT (7 is Sunday too)1-5, MON,WED, 5#3 (Quartz: third Thursday)

Cron dialects compared

DialectFieldsTime zoneDifferences
Unix cron5The server's@daily and friends; day of month or day of week when both are set.
GitHub Actions5Always UTCNo @ macros; at most every 5 minutes; runs can start late under load.
Kubernetes CronJob5spec.timeZone, else the controller'sMacros except @reboot; no TZ= inside the schedule.
Quartz (Java, Spring)6–7, seconds firstThe scheduler's? in day of month or week; L, W, #; Sunday is 1, not 0.

Common schedules

Four cron gotchas

  • Day of month OR day of week0 9 1 * 1 runs on the 1st and on every Monday, not on Mondays that fall on the 1st.
  • Months without the day0 0 31 * * runs in only seven months. Quartz's L means "last day".
  • Whose 09:00?A schedule runs on the server's clock — UTC on most cloud machines, and always UTC on GitHub Actions.
  • Daylight saving timeA job at 02:30 in a zone that skips 02:00–03:00 runs zero times that day, and one at 01:30 runs twice in autumn.

How to use the cron explainer

  1. Pick the Dialect your schedule runs in.
  2. Paste or type the expression — or click one of the common schedules above.
  3. Read the sentence and each field's meaning, and check the warnings.
  4. Check the Next 10 runs, shown in the time zone you choose and in UTC.
  5. Or build one with Build an Expression, then copy the crontab line, workflow or CronJob snippet.

Frequently asked questions

Why did my job run on the wrong day?

When both the day of month and the day of week are restricted, Unix cron runs on days that match either. 0 9 1-7 * 1 runs on the first seven days of the month and on every Monday. To get "the first Monday", restrict one field and check the other inside the script, or use Quartz's 1#1.

Why does my GitHub Actions schedule run late?

GitHub queues scheduled workflows and can delay them during busy periods, especially at the start of every hour. Schedules are always in UTC, and anything more frequent than every 5 minutes is not supported. Pick an odd minute such as 17 instead of 0.

Which time zone does my cron use?

Unix cron uses the server's zone. GitHub Actions always uses UTC. A Kubernetes CronJob uses spec.timeZone if you set it, otherwise the controller manager's zone — set it explicitly. Quartz uses the scheduler's zone unless the trigger names one.

Why did a job run twice, or not at all, around a clock change?

A time that is skipped when clocks go forward never matches, and a time that repeats when they go back matches twice — that is what the next runs above show. Some daemons compensate: Vixie cron and cronie run a skipped fixed-time job right after the change and do not repeat one in the doubled hour.

What are the six- and seven-field expressions I see in Java?

That is Quartz, used by Spring's @Scheduled and many Java schedulers: seconds come first, an optional year comes last, and one of the two day fields must be ?. Choose the Quartz dialect to read them.

Related tools

Learn more