Cron Expression Syntax: A Plain-English Guide with Examples
The five cron fields, what *, /, - and , mean, 15 copy-ready schedules, and the time-zone gotcha that makes jobs run at the wrong hour.
Editorial disclosure: Pyalm publishes and maintains the products and free tools discussed on this site. Regulatory statements are linked to primary sources where applicable. No independent professional review is claimed unless a reviewer is explicitly named.
Cron is how servers, Kubernetes, GitHub Actions and most cloud schedulers know when to run a job. A cron expression is five fields separated by spaces — compact, powerful and easy to get subtly wrong.
The five fields
┌───────── minute (0–59)
│ ┌─────── hour (0–23)
│ │ ┌───── day of month (1–31)
│ │ │ ┌─── month (1–12 or JAN–DEC)
│ │ │ │ ┌─ day of week (0–7 or SUN–SAT; 0 and 7 are Sunday)
│ │ │ │ │
* * * * *
Special characters
| Symbol | Meaning | Example |
|---|---|---|
* |
Every value | * in hour = every hour |
, |
A list | 1,15 = the 1st and 15th |
- |
A range | 1-5 = Monday to Friday |
/ |
A step | */10 = every 10th |
15 ready-made schedules
| Schedule | Expression |
|---|---|
| Every minute | * |
| Every 5 minutes | /5 * |
| Every 15 minutes | /15 * |
| Every hour on the hour | 0 |
| Every day at midnight | 0 0 * |
| Every day at 9:00 | 0 9 * |
| Weekdays at 9:00 | 0 9 1-5 |
| UAE working week (Mon–Fri) at 8:30 | 30 8 1-5 |
| Every Monday at 8:00 | 0 8 1 |
| Twice a day (9:00 and 18:00) | 0 9,18 * |
| 1st of every month at midnight | 0 0 1 |
| 15th and last-ish day (28th) | 0 0 15,28 |
| Every quarter (Jan, Apr, Jul, Oct) | 0 0 1 /3 |
| Every Sunday at 2:00 (backups) | 0 2 0 |
| Once a year on 1 January | 0 0 1 1 * |
Build your own visually with the free Cron Expression Generator — it explains any expression in plain English and lists the next 10 run times.
The time-zone gotcha
Cron runs in the scheduler's time zone, and on cloud platforms that's usually UTC. 0 9 * then runs at 13:00 in Dubai and 14:30 in India. Either convert your intended local time to UTC, or set the scheduler's time zone explicitly where supported (Kubernetes timeZone, many cloud schedulers). The generator's next-run preview can show both local time and UTC.
Day of month AND day of week
When both fields are restricted, standard cron runs when either matches. 0 9 1 1 runs on the 1st of the month and* every Monday — not "the 1st if it's a Monday". To get an AND condition, schedule the broader case and check the date in your script.
No "last day of month" in standard cron
Five-field cron can't express "the last day". Common workaround: run on days 28–31 and exit unless tomorrow is the 1st. Some schedulers (Quartz) support L, but it isn't portable.
Good habits
- Log the start and end of every job, and alert on failures.
- Make jobs safe to run twice (idempotent) in case of retries.
- Avoid scheduling everything at
0 0 *— stagger heavy jobs. - Add a comment above each crontab line saying what it does.
From cron jobs to real automation
Scheduled scripts are a starting point. Monthly reports, payment reminders, stock sync and data backups often grow into workflows with approvals, retries and notifications. Pyalm designs business automation that runs reliably and tells you when something needs attention.
Related free tools
Cron Expression Generator | Epoch Converter | Time Zone Converter | All free tools