⌘K

Developer

Cron Expression

A cron expression is a compact string of time fields that tells a scheduler exactly when a recurring job should run.

Updated 12 Aug 2026

Five fields, one schedule

A standard cron expression has five space-separated fields: minute, hour, day of month, month and day of week. A job runs when the current time matches every field. Some schedulers prepend a seconds field or append a year, which is why an expression copied between systems can behave unexpectedly.

FieldRangeNotes
Minute0–59
Hour0–2324-hour clock
Day of month1–31
Month1–12Names such as JAN are often accepted
Day of week0–60 is Sunday in most implementations

Special characters

  • * — every value in the field
  • */n — every n units, so */5 in minutes means :00, :05, :10 and so on
  • a-b — an inclusive range, such as 9-17 for working hours
  • a,b,c — a list of specific values

When both day of month and day of week are restricted, most cron implementations run the job if either matches, not both. This surprises people writing schedules like "the 1st, but only on a Monday".

Worked examples

ExpressionMeaning
*/5 * * * *Every five minutes
0 * * * *Hourly, on the hour
30 2 * * *Every day at 02:30
0 9 * * 1-509:00 on weekdays
0 0 1 * *Midnight on the first of each month

Cron Expression

Build a schedule visually, read it in plain English and preview the next runs.

Try Cron Expression

Characteristics

  • Five fields in standard Unix cron, six or seven in some schedulers
  • Matches on wall-clock time in the scheduler's timezone
  • Supports wildcards, steps, ranges and lists
  • Stateless — a missed run is not replayed by default

Common uses

  • Nightly backups, exports and report generation
  • Cache warming and cleanup jobs
  • Polling external systems on a fixed interval
  • Scheduled emails, digests and reminders

Advantages

  • One short string expresses complex recurring schedules
  • Supported by Linux, Kubernetes, CI systems and most job runners
  • No dependencies or extra infrastructure required
  • Easy to version-control alongside application code

Limitations

  • Cryptic to read without a translator
  • Daylight-saving transitions can skip or repeat a run
  • Overlapping executions must be prevented by the job itself
  • No native retries or failure alerting

Examples

Reading an expression field by field
15 3 * * 1
│  │ │ │ └── day of week: Monday
│  │ │ └──── month: every
│  │ └────── day of month: every
│  └──────── hour: 03
└─────────── minute: 15

=> 03:15 every Monday

Frequently asked questions

What does */5 * * * * mean?

Run every five minutes, at every hour of every day.

How do I run a job every weekday morning?

Use 0 9 * * 1-5 for 09:00 Monday to Friday in the scheduler's timezone.

Which timezone does cron use?

The host or scheduler timezone, which is often UTC on servers. Set it explicitly where possible.

Why did my job run twice?

Either a daylight-saving change repeated the hour, or a previous run had not finished and overlapped.

Do all cron systems use five fields?

No. Quartz and some cloud schedulers add seconds or a year, so check the target syntax before copying.

Related terms

All terms

Related tools

Related guides

All guides