Cron Expressions
Quick reference for cron expression syntax: fields, special characters, common schedules, and platform differences (Linux, GitHub Actions, AWS, Quartz).
A cron expression is a string of 5 (or 6) fields separated by spaces that defines a recurring schedule for a job. It is used in Unix/Linux cron daemons, GitHub Actions, Kubernetes CronJobs, AWS EventBridge, and many other schedulers.
Timezone: cron runs in the server's local timezone. GitHub Actions always uses UTC. Make sure your times account for the target timezone.
Expression Anatomy
→ At 09:00, every Monday
Field Reference
| Pos | Field | Allowed values | Special characters |
|---|---|---|---|
| 1 | Minute | 0–59 | * , - / |
| 2 | Hour | 0–23 | * , - / |
| 3 | Day of month | 1–31 | * , - / ? L W |
| 4 | Month | 1–12 or JAN–DEC | * , - / |
| 5 | Day of week | 0–6 or SUN–SAT | * , - / ? L # |
| 6 | Second | 0–59 | * , - / (Quartz, Spring only) |
Special Characters
Wildcard
Matches every value of the field.
* * * * * — every minuteList
Separates multiple values.
0 9,17 * * * — at 09:00 and 17:00Range
Specifies a continuous range of values.
0 9-17 * * * — every hour 9am–5pmStep
Every N units. */5 means every 5 units starting from 0.
*/15 * * * * — every 15 minutesAny
Quartz · AWSUsed in day-of-month or day-of-week to mean "no specific value". Avoids conflicts when specifying both fields.
0 0 1 * ? — midnight on the 1stLast
Quartz · AWSLast day of the month, or last weekday. In day-of-week, 5L means last Friday.
0 0 L * * — midnight last day of monthWeekday
Quartz · AWSNearest weekday (Mon–Fri) to a given day of the month.
0 9 15W * * — 9am on weekday nearest the 15thNth weekday
Quartz onlyThe Nth occurrence of a weekday in a month.
0 9 * * 1#2 — 9am on 2nd MondayCommon Examples
| Expression | Meaning |
|---|---|
* * * * * | Every minute |
0 * * * * | Every hour, on the hour |
*/15 * * * * | Every 15 minutes |
5 */2 * * * | At :05 of every 2 hours |
0 0 * * * | Every day at midnight |
0 9 * * 1-5 | Every weekday at 9:00 AM |
0 9-17 * * 1-5 | Every hour from 9am to 5pm, weekdays |
30 8 * * 1-5 | Weekdays at 8:30 AM |
0 9,17 * * 1-5 | At 9:00 AM and 5:00 PM on weekdays |
0 0 * * 0 | Every Sunday at midnight |
0 0 1 * * | First day of every month at midnight |
0 0 1,15 * * | Midnight on the 1st and 15th of each month |
0 0 1 1 * | Every 1st of January at midnight |
@ Shortcuts
| Alias | Equivalent | Meaning |
|---|---|---|
| @reboot | — | Run once at startup |
| @hourly | 0 * * * * | Every hour at minute 0 |
| @daily | 0 0 * * * | Every day at midnight |
| @midnight | 0 0 * * * | Same as @daily |
| @weekly | 0 0 * * 0 | Every Sunday at midnight |
| @monthly | 0 0 1 * * | First day of every month at midnight |
| @yearly | 0 0 1 1 * | Every 1st of January at midnight |
| @annually | 0 0 1 1 * | Same as @yearly |
Supported in: Linux/Unix cron, Kubernetes. Not available in GitHub Actions, AWS EventBridge, or Quartz.
Platform Differences
| Platform | Fields | Notes |
|---|---|---|
| Unix / Linux cron | min hour dom month dow | Standard 5-field format. Supports @ shortcuts. Runs in local timezone. |
| GitHub Actions | min hour dom month dow | 5-field format. Always UTC. Minimum interval: 5 minutes. |
| Kubernetes CronJob | min hour dom month dow | 5-field format. Supports @hourly, @daily, @weekly, @monthly, @yearly. |
| AWS EventBridge | min hour dom month dow year | 6-field format with year. ? required in either dom or dow. |
| Quartz Scheduler | sec min hour dom month dow [year] | 6–7 fields. Seconds are the first field. Supports ?, L, W, #. |
| Spring @Scheduled | sec min hour dom month dow | 6-field Quartz-style. Seconds first. No year field. |
Try our Cron Expression Parser →
Paste any cron expression and get an instant human-readable explanation of when it fires.