Cron Expression Cheat Sheet With Examples
Read and write cron expressions: the five fields, the special characters, and copy-paste schedules for every 5 minutes, weekdays at 9am, monthly jobs and more.
A cron expression is five fields that say when a job should run. Once you can read the fields, you can read any schedule. This page covers the syntax, a table of ready-made schedules, and the mistakes that make a job run at the wrong time.
You can paste any expression below into the cron tool to see it explained in plain language and check the next run times.
Cron Expression Generator and ParserWrite a cron expression and see the next times it will actually run. Every field is validated, and schedules that can never fire are flagged.The five fields
┌──────── minute (0-59)
│ ┌────── hour (0-23)
│ │ ┌──── day of month (1-31)
│ │ │ ┌── month (1-12)
│ │ │ │ ┌ day of week (0-6, Sunday is 0)
│ │ │ │ │
* * * * *
A job runs when every field matches the current time. 30 14 * * * means minute 30 of hour 14, on any day, any month, any weekday: every day at 14:30.
Special characters
| Character | Meaning | Example |
|---|---|---|
* | Every value | * * * * * runs every minute |
, | A list of values | 0 9,17 * * * runs at 09:00 and 17:00 |
- | A range | 0 9 * * 1-5 runs at 09:00 Monday to Friday |
/ | A step | */15 * * * * runs every 15 minutes |
Many cron implementations also accept shortcuts such as @hourly, @daily, @weekly and @monthly. They are convenient but not part of the original five-field format, so check your scheduler before relying on them.
Common schedules
| Schedule | Expression |
|---|---|
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every hour, on the hour | 0 * * * * |
| Every day at midnight | 0 0 * * * |
| Every day at 02:30 | 30 2 * * * |
| Every 6 hours | 0 */6 * * * |
| Weekdays at 09:00 | 0 9 * * 1-5 |
| Every Sunday at 03:00 | 0 3 * * 0 |
| First day of every month at 00:00 | 0 0 1 * * |
| January 1st at 00:00 | 0 0 1 1 * |
Mistakes that cause surprises
Using * where you meant 0
* 3 * * * does not mean "once at 03:00". The minute field is *, so it runs every minute from 03:00 to 03:59: sixty times. Pin the minute: 0 3 * * *.
Steps restart at the top of each unit
*/7 * * * * runs at minutes 0, 7, 14 and so on up to 56, then starts again at minute 0 of the next hour, only four minutes later. A step only gives an even interval when it divides the field evenly (5, 10, 15, 20, 30 for minutes).
Day of month and day of week are combined with OR
If you restrict both fields, standard cron runs the job when either matches. 0 9 15 * 1 fires on the 15th of the month and on every Monday, not only on Mondays that fall on the 15th. If you need the AND, run the job daily and check the date inside the script.
Time zones
Cron uses the time zone of the machine or service that runs it, which is often UTC on servers and CI systems. 0 9 * * * on a UTC server is 09:00 UTC, not 09:00 where you live. Daylight saving changes can also skip or repeat a local time, so critical jobs are safer on UTC.
Different dialects
Not every scheduler uses five fields. Quartz and Spring add a leading seconds field, and some cloud schedulers add a year or use different day-of-week numbering. If an expression that worked elsewhere is rejected, count the fields first.
Checking the next runs
The most reliable way to confirm an expression is to look at the actual upcoming run times rather than trusting your reading of it. If you are comparing against logged times, the timestamp converter helps translate between epoch values and dates.
Unix Timestamp ConverterConvert a Unix timestamp to a readable date or the other way round. The unit is detected automatically and every result shows its time zone.