Read a cron expression
A standard cron expression has five fields: minute, hour, day of month, month, day of week. `0 9 * * 1` runs at 09:00 every Monday. The asterisk means every value.
Cron expressions are short, unforgiving, and easy to read backwards. Five fields, space separated, each a constraint on when the job runs.
┌───────── minute 0-59
│ ┌─────── hour 0-23
│ │ ┌───── day of month 1-31
│ │ │ ┌─── month 1-12
│ │ │ │ ┌─ day of week 0-6 (0 = Sunday)
│ │ │ │ │
0 9 * * 1
Reading the example
0 9 * * 1 — minute 0, hour 9, any day of the month, any month, day of week 1 (Monday). Once a week, Monday at 09:00.
| Expression | Meaning |
|---|---|
*/5 * * * * | Every 5 minutes |
0 * * * * | Every hour, on the hour |
0 0 * * * | Every day at midnight |
30 2 * * 0 | Sundays at 02:30 |
0 9 1 * * | 09:00 on the first of every month |
0 9-17 * * 1-5 | Hourly from 09:00 to 17:00, Monday to Friday |
0 0 29 2 * | Midnight on 29 February — the leap-day job |
The three syntaxes that look like typos
- Lists use commas:
0 6,12,18 * * *runs three times a day. - Ranges use a hyphen:
0 9-17 * * *. - Steps use a slash:
*/15means every 15th value. Writing5in the minute field means minute five, once an hour — not every five minutes. That is the single most common cron mistake.
The day-of-month trap
When both day fields are restricted, most cron implementations combine them with OR, not AND. 0 0 13 * 5 does not mean "Friday the 13th". It means "the 13th of the month, or any Friday" — roughly five times a month instead of once or twice a year.
If you need both conditions, put the job behind a check in your script rather than trying to express it in cron.
Timezones and daylight saving
Cron runs in the server's timezone, which on most Linux hosts is UTC. A job at 0 9 * * * fires at 09:00 UTC, which is 14:00 in Karachi and 04:00 in New York. Two consequences follow: the local time of a job shifts when daylight saving changes, and a job scheduled between 02:00 and 03:00 can be skipped entirely on the spring-forward night.
For anything user-facing, schedule in UTC and convert in the application, or use a scheduler that accepts an explicit timezone.
Six fields and the question mark
Quartz-style schedulers add seconds as the first field and sometimes a year as the seventh: 0 0 9 * * ? is 09:00:00 daily. The ? means "no specific value" and exists because those schedulers refuse to have both day fields set at once. If a cron expression has six or seven fields, you are not looking at standard cron.
Questions
What does */5 mean?
Every fifth value. In the minute field it means minutes 0, 5, 10 and so on — every five minutes. A bare 5 means minute five only.
Is Sunday 0 or 7?
Both work in most implementations. 0 is the traditional value; 7 is accepted in many but not all parsers.
Why did my job run twice on the 13th?
Because day-of-month and day-of-week are combined with OR in standard cron. Restricting both does not require both to match.
Does cron handle daylight saving?
Poorly. Jobs in the skipped hour do not run, and jobs in the repeated hour may run twice. Schedule outside 01:00–03:00 local time if that matters.
Updated 2026-11-16 · written for this site, no trackers, no account.