* * * * * is not a password. It is a schedule written in five fields separated by spaces, and once you can read it, every crontab on every server stops looking like line noise.

┌──────── minute (0–59)
│ ┌────── hour (0–23)
│ │ ┌──── day of month (1–31)
│ │ │ ┌── month (1–12)
│ │ │ │ ┌ day of week (0–6, Sunday = 0)
│ │ │ │ │
* * * * *

The four symbols

Symbol Meaning Example
* every value * in hour means every hour
, a list 1,15,30
- a range 1-5
/ a step */15

Steps are the one people get wrong. */15 in the minute field means every 15 minutes starting at 0: 00, 15, 30, 45. 5/15 means starting at 5 and stepping 15: 05, 20, 35, 50 — a Vixie cron extension, not universal.

Read these

Expression Meaning
* * * * * every minute
*/15 * * * * every 15 minutes
0 * * * * every hour, on the hour
0 9 * * 1-5 09:00, Monday to Friday
30 3 * * 0 03:30 on Sunday
0 0 1 * * midnight on the first of the month
0 6 1 1,4,7,10 * 06:00 on the first of January, April, July and October
0 0 29 2 * 29 February — every four years, if the year is a leap year

That last one is legal and almost never runs. Cron does not warn you about impossible dates; it simply never matches.

The day rule that surprises everyone

When both day-of-month and day-of-week are restricted, classic cron runs the job if either matches:

  • 0 0 1 * 1 → the first of the month and every Monday.
  • 0 0 1 * * → only the first of the month.

If one of the two is *, only the other counts. That is the whole rule, and it is the reason a “first Monday of the month” job cannot be written in plain cron without a wrapper.

The shortcuts

Most Linux crons accept these instead of five fields:

Shortcut Equivalent
@yearly / @annually 0 0 1 1 *
@monthly 0 0 1 * *
@weekly 0 0 * * 0
@daily / @midnight 0 0 * * *
@hourly 0 * * * *
@reboot once, when the daemon starts

They are a Vixie cron extension, not POSIX, so a minimal container image may not support them. @reboot in particular is not a schedule: it runs once at startup and never again.

The time zone trap

Cron uses the system time zone, which on a server is usually UTC. A job written as “09:00” on your laptop fires at 08:00 or 10:00 local depending on the season, because daylight saving moves the offset and cron does not move with it.

Two consequences worth knowing:

  • A job scheduled inside the hour that daylight saving skips may not run that day.
  • A job inside the repeated hour may run twice.

If the exact local time matters, run the job in UTC and convert in the script, or use a scheduler that understands time zones.

Before you paste it

Check the next runs with the cron explainer, or build the expression in the cron schedule generator with presets instead of typing asterisks. Both show the next executions in your browser’s time zone, which is exactly the check that catches “I meant 15:00 and wrote 03:00”.

And if the job cannot overlap with itself, add a lock in the script. Cron will happily start a second copy while the first one is still running.

Cron is the most reliable scheduler ever written and the least helpful when it fails. Reading it is half the job.

Hero photo: Black Alarmclock, CC0, via Openverse (StockSnap).