On this page
Cron expressions are five tiny fields that decide when your backups run, your reports send, and your caches clear. They're easy to write and easy to get subtly wrong: a job that runs every minute of the hour instead of once, or at 9am UTC instead of 9am for your users.
This guide covers how the fields work, the characters that cause most mistakes, and 20 schedules you can copy.
The five fields
┌───────────── minute (0–59)
│ ┌─────────── hour (0–23)
│ │ ┌───────── day of month (1–31)
│ │ │ ┌─────── month (1–12)
│ │ │ │ ┌───── day of week (0–6, Sunday = 0; many systems also accept 7)
│ │ │ │ │
* * * * *A job runs when every field matches the current time, with one important exception for the two day fields, covered below.
The special characters
| Character | Meaning | Example | Reads as |
|---|---|---|---|
* | Every value | * * * * * | Every minute |
, | A list | 0 9,17 * * * | At 09:00 and 17:00 |
- | A range | 0 9 * * 1-5 | 09:00, Monday to Friday |
/ | A step | */15 * * * * | Every 15 minutes |
You can combine them: 0 9-17/2 * * 1-5 means every two hours from 09:00 to 17:00 on weekdays (9, 11, 13, 15, 17).
Most cron implementations also accept names for months and weekdays, such as JAN or MON. Numbers work everywhere, so they're the safer choice.
20 schedules to copy
Every few minutes or hours
| Schedule | Expression |
|---|---|
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every hour, on the hour | 0 * * * * |
| Every 2 hours | 0 */2 * * * |
| Every 30 minutes during working hours, weekdays | */30 9-17 * * 1-5 |
| Every hour from 09:00 to 17:00, weekdays | 0 9-17 * * 1-5 |
Daily
| Schedule | Expression |
|---|---|
| Every day at midnight | 0 0 * * * |
| Every day at 02:30 | 30 2 * * * |
| Twice a day, 00:00 and 12:00 | 0 0,12 * * * |
| Every weekday at 09:00 | 0 9 * * 1-5 |
| Every weekday at 22:00 | 0 22 * * 1-5 |
| Weekends at 03:00 | 0 3 * * 0,6 |
Weekly
| Schedule | Expression |
|---|---|
| Every Monday at 09:00 | 0 9 * * 1 |
| Every Friday at 18:00 | 0 18 * * 5 |
| Every Sunday at midnight | 0 0 * * 0 |
Monthly and yearly
| Schedule | Expression |
|---|---|
| First day of every month at midnight | 0 0 1 * * |
| 15th of every month at 09:00 | 0 9 15 * * |
| First day of every quarter | 0 0 1 1,4,7,10 * |
| Every 1 January at midnight | 0 0 1 1 * |
| Last day of the month (see below) | 0 0 28-31 * * + a check |
Five gotchas that cause most cron bugs
1. * in the minute field means every minute
* 9 * * *This doesn't run at 9am. It runs 60 times, every minute from 09:00 to 09:59. If you want once, set the minute: 0 9 * * *.
2. Day-of-month and day-of-week are OR, not AND
You might expect this to mean "Friday the 13th":
0 0 13 * 5In standard (Vixie) cron, when both day fields are restricted, the job runs if either matches: every 13th of the month and every Friday. To get "Friday the 13th", schedule one field and check the other in your script:
0 0 13 * * [ "$(date +\%u)" = 5 ] && /path/to/job.shNote the \%: inside a crontab, a bare % means "new line", so it has to be escaped.
3. There's no "last day of the month" in standard cron
L (as in 0 0 L * *) works in Quartz and some cloud schedulers, but not in classic cron. The portable trick is to run on days 28–31 and check whether tomorrow is the 1st:
0 0 28-31 * * [ "$(date -d tomorrow +\%d)" = 01 ] && /path/to/job.shdate -d tomorrow is GNU date, which is what most Linux servers have. On macOS and BSD, use date -v+1d +%d.
4. Time zones
Cron uses the time zone of whatever runs it, and that's often UTC, not yours.
- A Linux server uses the system time zone, so check it with
timedatectl. Some cron versions accept aCRON_TZ=line at the top of the crontab. - GitHub Actions runs schedules in UTC by default. A 2026 update added an optional time zone setting per schedule, so check the docs for your setup. The minimum interval is every 5 minutes, and runs can be delayed when GitHub is busy, so avoid exactly
:00for jobs that matter. - Kubernetes CronJobs use
.spec.timeZone(stable since v1.27) with names like"Asia/Dhaka". PuttingCRON_TZorTZinsidescheduleis rejected.
If daylight saving applies, a job at 02:30 can run twice or not at all on the night the clocks change. Schedule important jobs outside 01:00–03:00, or run them in UTC.
5. Not every "cron" is the same cron
| System | Fields | Notes |
|---|---|---|
| Linux crontab | 5 | The baseline in this guide |
| GitHub Actions | 5 | UTC by default, minimum 5 minutes |
| Kubernetes | 5 | Time zone in a separate field |
| Quartz (Java), Spring | 6 or 7 | Adds seconds first, optional year, uses ? |
| AWS EventBridge | 6 | Adds year at the end, requires ? in one day field |
A Quartz expression like 0 0 9 * * ? (09:00 daily) is invalid in a crontab, and a crontab line pasted into Spring will run at the wrong time. Always check which flavour your platform expects.
Shortcuts
Many cron implementations accept named shortcuts:
| Shortcut | Same as |
|---|---|
@hourly | 0 * * * * |
@daily | 0 0 * * * |
@weekly | 0 0 * * 0 |
@monthly | 0 0 1 * * |
@yearly | 0 0 1 1 * |
@reboot | Once, at startup |
They're readable, but not universal: GitHub Actions, for example, doesn't support them. When in doubt, write the five fields.
Check before you deploy
Before a schedule goes live, read it back in plain words and look at its next few run times. Most cron bugs are obvious the moment you see "next run: every minute between 09:00 and 09:59".
The utilyx cron parser does both as you type: it explains the expression in plain English and lists the next runs in your time zone and in UTC. It runs in your browser, so nothing about your infrastructure leaves your machine.