AWS cron expression format
Inside cron(…), AWS expects six fields separated by spaces:
| Field | Allowed values | Special characters |
|---|---|---|
| Minute | 0–59 | , - * / |
| Hour | 0–23 | , - * / |
| Day of month | 1–31 | , - * ? / L W |
| Month | 1–12 or JAN–DEC | , - * / |
| Day of week | 1–7 or SUN–SAT (1 = Sunday) | , - * ? L # |
| Year | 1970–2199 | , - * / |
Special characters
| Symbol | Meaning |
|---|---|
? | No specific value. One of day-of-month and day-of-week must be ?; the other can be * or a value. |
L | Last: L in day-of-month is the last day of the month, and L in day-of-week is the last day of the week (Saturday). |
W | Nearest weekday: 3W runs on the weekday closest to the 3rd of the month. |
# | The nth weekday: 3#2 is the second Tuesday of the month. |
/ | Increments: 0/15 in the minutes field runs at minutes 0, 15, 30 and 45. |
AWS EventBridge cron examples
Click an expression to load it into the generator above.
| Expression | Schedule |
|---|---|
| Every 5 minutes. | |
| At 0 minutes past the hour. | |
| At 8:00 AM, Monday through Friday. | |
| Every 15 minutes, between 8:00 AM and 5:59 PM, Monday through Friday. | |
| At 12:00 AM, on day 1 of the month. | |
| At 6:00 PM, on the last day of the month. | |
| At 9:00 AM, on the first Monday of the month. | |
| At 12:00 PM, only on Sunday. | |
| At 6:30 AM, on day 1 of the month, only in January, in 2027. |
How AWS cron differs from Unix cron
- No seconds field, but a year field at the end — so an AWS expression has six fields and a Unix one has five.
0 8 * * ? *is 08:00 every day. - One day field must be
?:* * * * * *is rejected, while0/5 * * * ? *works. - Sunday is
1and Saturday is7, so Monday to Friday is2-6orMON-FRI. - EventBridge rules run in UTC. If the schedule has to follow local time and daylight saving time, create it in EventBridge Scheduler, which lets you choose a time zone.
- The finest interval is one minute. For a simple interval, a rate expression such as
rate(5 minutes)is easier to read.
Use it with the AWS CLI
For an EventBridge rule (always UTC):
aws events put-rule \
--name weekday-report \
--schedule-expression "cron(0 8 ? * MON-FRI *)"
For EventBridge Scheduler, with a time zone:
aws scheduler create-schedule \
--name weekday-report \
--schedule-expression "cron(0 8 ? * MON-FRI *)" \
--schedule-expression-timezone "Asia/Dubai" \
--flexible-time-window Mode=OFF \
--target file://target.json
Frequently asked questions
Why is my AWS cron expression invalid?
The usual causes are: only five fields (the year is missing — add * at the end), * in both day fields (one must be ?), 0 for Sunday (AWS uses 1–7), or a seconds field copied from Quartz or Spring.
Which time zone do EventBridge cron schedules use?
EventBridge rules always use UTC, so cron(0 8 * * ? *) fires at 08:00 UTC — 11:00 in Riyadh. EventBridge Scheduler accepts a time zone, such as Asia/Riyadh, and adjusts for daylight saving time.
What is the difference between cron() and rate() in AWS?
rate(5 minutes) runs at a fixed interval counted from when the schedule is created. cron(…) runs at calendar times, such as 08:00 on weekdays or the last day of the month.
Cron generators for other platforms
*/15 8-18 * * 1-5
Quartz Cron Expression Generator
0 0 8 ? * MON-FRI
Spring Cron Expression Generator
0 0 8 * * MON-FRI
Jenkins Cron Expression Generator
H 2 * * 1-5
Salesforce Cron Expression Generator
0 0 8 ? * MON-FRI
Hangfire Cron Expression Generator
0 8 * * 1-5
Airflow Cron Expression Generator
0 6 * * 1-5
node-cron Expression Generator
0 30 8 * * 1-5