Cron is a time-based job scheduler built into Unix systems. A cron expression is a string of five (or six) fields that tells the scheduler exactly when to run a job. You will find cron expressions in Linux crontab, AWS EventBridge, GitHub Actions, Kubernetes CronJobs, and most backend scheduling systems.
The five-field format
┌─ minute (0–59) │ ┌─ hour (0–23) │ │ ┌─ day of month (1–31) │ │ │ ┌─ month (1–12) │ │ │ │ ┌─ day of week (0–6, Sunday = 0) │ │ │ │ │ * * * * *
Each field can be a specific number, a range, a list, a step value, or an asterisk (wildcard meaning "every").
Special characters
| Symbol | Meaning | Example |
|---|---|---|
| * | Every value in the field | * in hour = every hour |
| , | List of values | 1,3,5 in hour = 1am, 3am, 5am |
| - | Range of values | 1-5 in day-of-week = Mon to Fri |
| / | Step value | */15 in minute = every 15 minutes |
10 common cron expressions
| Expression | Meaning |
|---|---|
| * * * * * | Every minute |
| 0 * * * * | Every hour at :00 |
| 0 9 * * 1-5 | 9am Monday to Friday |
| 0 0 * * * | Every day at midnight |
| 0 0 1 * * | First day of every month at midnight |
| */15 * * * * | Every 15 minutes |
| 0 9,17 * * * | 9am and 5pm every day |
| 0 0 * * 0 | Every Sunday at midnight |
| 0 12 * * 1 | Every Monday at noon |
| 0 0 1 1 * | Every January 1st at midnight |
Timezone gotchas
Cron runs in the server's local timezone by default. If your server is UTC but your users are in EST (UTC−5), a job scheduled for "9am" in cron runs at 4am their local time. Always verify which timezone your scheduler uses — many cloud platforms like AWS EventBridge let you specify a timezone explicitly.
Testing before production
Off-by-one errors in the day-of-week field are extremely common. Sunday is 0 in standard cron but 7 in some implementations. Always test your expression against a cron parser before deploying to production. Use our Cron Expression Explainer to translate any expression into plain English instantly.
Common cron expression examples
Here are the most commonly used cron expressions with plain-English explanations:
| Expression | Meaning |
|---|---|
| * * * * * | Every minute |
| 0 * * * * | Every hour, on the hour |
| 0 0 * * * | Every day at midnight |
| 0 9 * * 1 | Every Monday at 9:00 AM |
| 0 9 * * 1-5 | Every weekday at 9:00 AM |
| 0 0 1 * * | First day of every month at midnight |
| 0 0 1 1 * | Once a year, January 1st at midnight |
| */15 * * * * | Every 15 minutes |
| 0 0,12 * * * | Twice a day — midnight and noon |
| 0 8-18 * * 1-5 | Every hour from 8 AM to 6 PM, weekdays only |
The step operator (/) is one of the most useful parts of cron syntax. Writing */15 in the minutes field means 'every 15 minutes'. Writing */2 in the hours field means 'every 2 hours'. This lets you schedule frequent jobs without listing every individual time.
How to read a cron expression in 5 seconds
When you see an unfamiliar cron expression, read it right to left: day of week → month → day of month → hour → minute. Ask yourself: is this field a specific number, a wildcard (*), a range (1-5), or a step (*/15)? Most cron expressions follow one of four patterns: run once at a specific time, run repeatedly on an interval, run on specific days, or run on specific weekdays. Once you recognise the pattern, the expression reads itself.
Cron expression troubleshooting
The most common cron mistake is off-by-one errors on the day-of-week field. In standard cron, 0 = Sunday and 6 = Saturday. Some systems (like Linux crontab) also accept 7 as Sunday. If your Monday job runs on Sunday, check whether your system uses 0-based or 1-based day numbering.
The second most common mistake is timezone confusion. Cron runs in the server's local timezone unless explicitly configured otherwise. A job scheduled for 9 AM will run at 9 AM server time — which may be midnight your time if the server is in a different region. Always confirm your server timezone with timedatectl on Linux before writing production cron jobs.
The third issue is the difference between cron (5 fields) and crontab extensions or tools like AWS EventBridge, which add a sixth field for seconds or years. If your expression has 6 fields and isn't working, check whether your platform expects 5 or 6 fields.
Cron vs other schedulers
Cron is the right tool when you need simple, recurring time-based jobs on a Linux server. For more complex needs — retry logic, job dependencies, monitoring dashboards, or distributed systems — consider alternatives: GitHub Actions scheduled workflows use cron syntax but run in the cloud. AWS EventBridge Scheduler also uses cron expressions. APScheduler (Python) and node-cron (Node.js) bring cron-style scheduling into application code. Kubernetes CronJob runs containerised tasks on a cron schedule. All of these use the same five-field cron syntax you already know.
FAQ
What does * mean in a cron expression? The asterisk (*) is a wildcard meaning 'every possible value'. In the minutes field, * means every minute. In the hours field, * means every hour. Use * when you don't want to restrict that unit of time.
What is the difference between 0 * * * * and * * * * *? * * * * * runs every minute. 0 * * * * runs once per hour, at minute zero (the top of the hour). The first field controls minutes — putting 0 there pins the job to :00 of every hour.
How do I run a cron job every 15 minutes? Use */15 * * * *. The slash (/) is the step operator. */15 in the minutes field means 'start at 0, then every 15 minutes', so the job runs at :00, :15, :30, and :45 of every hour.
Why is my cron job running at the wrong time? The most likely cause is timezone mismatch. Cron uses the server's local timezone. Check your server timezone with timedatectl or date and compare it to the time you expected the job to run.
Does cron have a seconds field? Standard cron does not support seconds — the smallest interval is one minute. If you need sub-minute scheduling, use a language-level scheduler like APScheduler or node-cron, or a platform-specific tool like AWS EventBridge which supports seconds in its extended cron format.
