Cron Expressions Explained with 15 Examples
Understand the five cron fields, special characters like * / , and -, the Quartz format, and copy 15 ready-made cron expressions for common schedules.
By jsonbody.com Team ·
Cron schedules jobs such as backups, reports and cleanups. Its five-field syntax is compact but easy to get wrong. This guide explains the fields and special characters, then gives 15 expressions you can copy.
The five fields
┌──────── minute (0-59)
│ ┌────── hour (0-23)
│ │ ┌──── day of month (1-31)
│ │ │ ┌── month (1-12)
│ │ │ │ ┌ day of week (0-6, Sunday = 0)
│ │ │ │ │
* * * * *Special characters
| Character | Meaning | Example |
|---|---|---|
* | Every value | * in the hour field means every hour |
, | A list | 1,15 means the 1st and the 15th |
- | A range | 1-5 means Monday to Friday |
/ | A step | */10 in minutes means every 10 minutes |
15 cron expressions you can copy
| Schedule | Expression |
|---|---|
| Every minute | * * * * * |
| Every 5 minutes | */5 * * * * |
| Every 15 minutes | */15 * * * * |
| Every hour, on the hour | 0 * * * * |
| Every 2 hours | 0 */2 * * * |
| Every day at midnight | 0 0 * * * |
| Every day at 9:30 | 30 9 * * * |
| Twice a day, at 9:00 and 17:00 | 0 9,17 * * * |
| Weekdays at 9:00 | 0 9 * * 1-5 |
| Every 10 minutes during working hours on weekdays | */10 9-17 * * 1-5 |
| Every Friday at 18:00 | 0 18 * * 5 |
| Weekends at 3:00 | 0 3 * * 6,0 |
| Every Sunday at midnight | 0 0 * * 0 |
| First day of every month at midnight | 0 0 1 * * |
| Every year on 1 January | 0 0 1 1 * |
Paste any of these into the Cron Expression Generator to read it in plain English and see the next 10 run times in your time zone.

A common mistake: day of month and day of week together
If you restrict both day fields, standard cron runs the job when either matches. 0 0 13 * 5 runs on every 13th and every Friday, not only on Friday the 13th.
Quartz cron is different
Java schedulers such as Quartz and Spring use six or seven fields, starting with seconds, and need ? in one of the day fields. Weekdays at 9:00 in Quartz is:
0 0 9 ? * MON-FRIThe Cron Expression Generator supports both Linux and Quartz formats, and its help guide shows how.
Tips for reliable cron jobs
- Check which time zone the server uses; many run in UTC.
- Log each run, and alert when a job fails or does not run.
- Stop runs overlapping, for example with a lock file or
flock. - Use full paths in commands, because cron's environment is minimal.
Related reading
- Docker interview questions and Kubernetes interview questions, including CronJobs.
- AWS interview questions, including scheduled jobs with EventBridge.