Cron Expression Examples: Every Minute, Hour, Day, Week and More
Cron expressions follow a 5-field syntax that can express almost any recurring schedule. This is a practical reference of the most common patterns — copy-paste ready, with an explanation of what each field does.
Cron Field Reference
# ┌──────── minute (0–59)
# │ ┌────── hour (0–23)
# │ │ ┌──── day of month (1–31)
# │ │ │ ┌── month (1–12 or JAN–DEC)
# │ │ │ │ ┌ day of week (0–6, Sunday=0, or SUN–SAT)
# │ │ │ │ │
* * * * * command| Symbol | Meaning | Example |
|---|---|---|
| * | Any / every value | * in hours = every hour |
| */n | Every n units (step) | */15 in minutes = every 15 min |
| n | Exact value | 9 in hours = only at 9 AM |
| n-m | Range | 1-5 in weekday = Mon–Fri |
| n,m,p | List of values | 0,6,12,18 in hours = 4× per day |
| n-m/s | Range with step | 0-30/10 in minutes = 0, 10, 20, 30 |
Every Minute and Every N Minutes
| Expression | Schedule |
|---|---|
| * * * * * | Every minute |
| */2 * * * * | Every 2 minutes |
| */5 * * * * | Every 5 minutes |
| */10 * * * * | Every 10 minutes |
| */15 * * * * | Every 15 minutes |
| */30 * * * * | Every 30 minutes (at :00 and :30) |
| 0,15,30,45 * * * * | Every 15 minutes (explicit) |
Every Hour and Every N Hours
| Expression | Schedule |
|---|---|
| 0 * * * * | Every hour (at :00) |
| 30 * * * * | Every hour at :30 |
| 0 */2 * * * | Every 2 hours (00:00, 02:00, 04:00...) |
| 0 */4 * * * | Every 4 hours (00:00, 04:00, 08:00, 12:00, 16:00, 20:00) |
| 0 */6 * * * | Every 6 hours (00:00, 06:00, 12:00, 18:00) |
| 0 */12 * * * | Every 12 hours (midnight and noon) |
| 0 0,6,12,18 * * * | Every 6 hours (explicit list) |
Every Day
| Expression | Schedule |
|---|---|
| 0 0 * * * | Every day at midnight (00:00) |
| 0 1 * * * | Every day at 1:00 AM |
| 0 9 * * * | Every day at 9:00 AM |
| 0 12 * * * | Every day at noon |
| 0 18 * * * | Every day at 6:00 PM |
| 0 23 * * * | Every day at 11:00 PM |
| 30 8 * * * | Every day at 8:30 AM |
| 0 0 */2 * * | Every other day at midnight |
Specific Days of the Week
| Expression | Schedule |
|---|---|
| 0 9 * * 1-5 | Every weekday (Mon–Fri) at 9:00 AM |
| 0 9 * * MON-FRI | Every weekday at 9:00 AM (named days) |
| 0 0 * * 6,0 | Every weekend (Sat and Sun) at midnight |
| 0 0 * * 0 | Every Sunday at midnight |
| 0 0 * * 1 | Every Monday at midnight |
| 0 9 * * 1 | Every Monday at 9:00 AM |
| 0 17 * * 5 | Every Friday at 5:00 PM |
| 0 10 * * 6 | Every Saturday at 10:00 AM |
| 0 0 * * 1,4 | Every Monday and Thursday at midnight |
Specific Days of the Month
| Expression | Schedule |
|---|---|
| 0 0 1 * * | First day of every month at midnight |
| 0 0 15 * * | 15th of every month at midnight |
| 0 0 28 * * | 28th of every month (safe — exists in all months) |
| 0 0 1,15 * * | 1st and 15th of every month |
| 0 9 1 * * | First of every month at 9:00 AM |
| 0 0 1 1 * | January 1st at midnight (once a year) |
| 0 0 1 */3 * | First day of every quarter (Jan, Apr, Jul, Oct) |
| 0 0 1 1,4,7,10 * | First day of each quarter (explicit) |
Common Real-World Schedules
| Expression | Use case |
|---|---|
| */5 * * * * | Health check / polling every 5 minutes |
| 0 * * * * | Hourly data sync or cache refresh |
| 0 2 * * * | Nightly database backup at 2 AM |
| 0 0 * * 0 | Weekly report generation every Sunday |
| 0 9 * * 1-5 | Daily standup reminder on weekdays |
| 0 0 1 * * | Monthly invoice generation |
| 0 4 * * * | Nightly cleanup job (off-peak hours) |
| */15 9-17 * * 1-5 | Every 15 min during business hours (9–5, Mon–Fri) |
| 0 0 1 1 * | Yearly reset or annual archive |
| 0 12 * * 5 | Weekly Friday noon digest email |
Cron Expressions in Popular Platforms
Most platforms use standard 5-field cron syntax, but some add a sixth field for seconds or use slightly different conventions:
# Standard Unix cron (5 fields)
# MIN HOUR DOM MON DOW
0 9 * * 1-5 # Weekdays at 9 AM
# GitHub Actions — uses standard 5-field syntax (UTC timezone)
on:
schedule:
- cron: '0 9 * * 1-5'
# AWS EventBridge / CloudWatch Events — uses 6 fields (adds year)
# MIN HOUR DOM MON DOW YEAR
0 9 * * MON-FRI *
# Kubernetes CronJob — standard 5-field
spec:
schedule: "0 2 * * *"
# Node.js node-cron — standard 5-field (or 6 with seconds)
cron.schedule('0 9 * * 1-5', () => { ... });
# Python APScheduler — standard 5-field
scheduler.add_job(fn, 'cron', hour=9, day_of_week='mon-fri')
# Laravel (PHP) — uses named methods instead of raw cron
->dailyAt('09:00')->weekdays()
# But also accepts: ->cron('0 9 * * 1-5')Timezone Gotcha
Cron runs in the server's local timezone, which on most cloud servers (AWS, GCP, Azure) is UTC. If you want a job at 9 AM in London (BST, UTC+1), you need to set it to 0 8 * * *. If you're in New York (EDT, UTC-4), use 0 13 * * *.
# Job should run at 9:00 AM in each timezone:
# UTC (server default on most cloud providers)
0 9 * * *
# For 9 AM London (BST = UTC+1, summer)
0 8 * * *
# For 9 AM New York (EDT = UTC-4, summer)
0 13 * * *
# For 9 AM Tokyo (JST = UTC+9, no DST)
0 0 * * *
# Tip: set your server or container timezone explicitly
# In Docker: ENV TZ=Europe/London
# In Kubernetes: use spec.timeZone (K8s 1.27+):
spec:
schedule: "0 9 * * 1-5"
timeZone: "Europe/London"Day-of-Month + Day-of-Week: The OR Trap
When you specify both a day-of-month and a day-of-week (neither is *), most cron implementations run the job when either condition is true — not when both are true simultaneously:
# You might expect: "on the 1st, but only if it's a Monday"
# What you actually get: "on the 1st OR on any Monday"
0 0 1 * 1
# To truly mean "first Monday of the month", you need a script:
# 0 0 * * 1 [ $(date +%d) -le 07 ] && /path/to/job
# Or use a platform that supports @monthly + weekday logic natively
# (e.g. AWS EventBridge, Python APScheduler)Not sure your expression is correct? Test it in the Cron Expression Builder →
Frequently Asked Questions
What is a cron expression?▾
A cron expression is a string of 5 fields (separated by spaces) that defines a recurring schedule for a task. The fields represent minute, hour, day of month, month, and day of week — in that order. Each field can be a specific value, a wildcard (*), a range (1-5), a list (1,3,5), or a step (*/15). For example: '0 9 * * 1-5' means 'at 9:00 AM, every weekday'. The name comes from the Unix cron daemon that reads these expressions to schedule jobs.
What does */15 mean in a cron expression?▾
*/15 means 'every 15 units of that field'. In the minute field, */15 means every 15 minutes: at minutes 0, 15, 30, and 45 of every hour. In the hour field, */6 would mean every 6 hours (at 0, 6, 12, 18). The * means 'all values in the range' and /15 is the step interval. So */15 in minutes = 60/15 = 4 times per hour.
How do I run a cron job every weekday at 9 AM?▾
Use: 0 9 * * 1-5 — This runs at minute 0, hour 9, any day of month, any month, Monday through Friday. Day-of-week values: 0 = Sunday, 1 = Monday, 2 = Tuesday, 3 = Wednesday, 4 = Thursday, 5 = Friday, 6 = Saturday. The range 1-5 covers Monday to Friday. Some systems also accept named days: 0 9 * * MON-FRI.
What is the difference between cron and crontab?▾
Cron is the background daemon (service) that reads schedules and runs jobs at the specified times. Crontab (cron table) is the configuration file that defines those schedules — one line per job. You edit the crontab with 'crontab -e' on Linux/macOS. Each line in the crontab is a cron expression followed by the command to run. Modern systems like Kubernetes, GitHub Actions, and cloud schedulers use cron expression syntax without the underlying Unix cron daemon.
Why didn't my cron job run at the expected time?▾
Common causes: (1) Timezone — cron runs in the server's local timezone by default (usually UTC on cloud servers). If you expected 9 AM local time but your server is UTC+0 and you're UTC+2, use 7 AM in the cron. (2) Day-of-month and day-of-week conflict — if both are specified (not *), most cron implementations run the job when EITHER condition is met, not when both are met. (3) The job itself failed — check logs. (4) Cron wasn't running — verify with 'systemctl status cron'. (5) Off-by-one — cron doesn't run 'at minute 60', use 0 for the top of the hour.
How do I run a cron job every 30 seconds?▾
Standard cron has 1-minute resolution — it cannot schedule jobs more frequently than once per minute. To run every 30 seconds, a common workaround is two cron entries: '* * * * * /path/to/job' and '* * * * * sleep 30 && /path/to/job'. The first runs at the start of each minute, the second waits 30 seconds then runs. For sub-minute precision in production, use a proper job scheduler like systemd timers, Celery Beat, or a dedicated queue worker.