Common Cron Expression Examples Explained

Cron expressions look cryptic until you learn the five fields. After that, most schedules become readable in a few seconds. This guide covers the patterns you'll encounter most often.

The five fields

# minute  hour  day-of-month  month  day-of-week
    0       9        *           *        1-5
# = 9:00am every weekday

Left to right: minute (0–59), hour (0–23), day of month (1–31), month (1–12), day of week (0–7, where 0 and 7 both mean Sunday).

Special characters: * means "every", */n means "every n", a-b is a range, a,b is a list.

Common examples

Every minute: * * * * * — all five fields are wildcards. Useful for testing or high-frequency health checks.

Every hour on the hour: 0 * * * * — fires at 00:00, 01:00, 02:00, etc. The 0 in the minute field is critical — without it, it would fire every minute.

Every day at 9am: 0 9 * * * — fires once per day at 09:00. Remember: the time is in the server timezone, usually UTC in cloud environments.

Every weekday at 9am: 0 9 * * 1-5 — the 1-5 means Monday (1) through Friday (5).

Every Monday at 8am: 0 8 * * 1 — weekly recurring job.

First of every month at midnight: 0 0 1 * * — monthly billing runs, monthly archives.

Every 15 minutes: */15 * * * * — fires at :00, :15, :30, :45 of every hour.

Every 6 hours: 0 */6 * * * — fires at 00:00, 06:00, 12:00, 18:00.

Twice daily at 8am and 8pm: 0 8,20 * * * — the comma creates a list in the hour field.

Every weekday at 9am, only in January: 0 9 * 1 1-5 — month field is 1 (January).

Common mistakes

Forgetting timezone. Cloud servers default to UTC. If your job needs to run at 9am Berlin time (CET/UTC+1 or CEST/UTC+2), the cron time is 8 or 7 in the hour field depending on DST.

Setting both day-of-month and day-of-week. Most cron implementations treat these as OR — the job fires if either condition matches. 0 9 1 * 1 fires on the 1st of each month AND on every Monday, not just Mondays that fall on the 1st.

Test before deploying: use a cron expression generator that shows the next 5–10 scheduled run times. This immediately reveals errors like "fires every minute" when you meant "fires every Monday."