AWS Cron Expression for EventBridge
An AWS cron expression has six fields, ends with a year, and needs a ? in one of the two day fields. Build and check yours below, then read how EventBridge rules and Scheduler differ.
The short answer
An AWS cron expression for EventBridge has six fields, minutes hours day-of-month month day-of-week year, wrapped in cron( ). One of the two day fields must be ?. Weekdays at 9:00 UTC looks like this:
cron(0 9 ? * MON-FRI *)Rules run in UTC. EventBridge Scheduler can use a time zone. Both use this same syntax.
Build an AWS EventBridge cron expression
Set the fields and the output follows AWS EventBridge rules, with the next runs in your time zone. Copy the result or open it in the full Generator.
AWS cron expression syntax
EventBridge cron expressions have six required fields separated by white space. The year is required, and * is the usual value for it.
cron(minutes hours day-of-month month day-of-week year)| Field | Values | Wildcards |
|---|---|---|
| Minutes | 0-59 | , - * / |
| Hours | 0-23 | , - * / |
| Day-of-month | 1-31 | , - * ? / L W |
| Month | 1-12 or JAN-DEC | , - * / |
| Day-of-week | 1-7 or SUN-SAT | , - * ? L # |
| Year | 1970-2199 | , - * / |
The two differences from the Linux form that cause most errors are the extra year field and the numbering of weekdays: 1 is Sunday and 7 is Saturday. Names such as MON-FRI remove the ambiguity, so prefer them.
AWS EventBridge cron expression examples
Each expression below was parsed and formatted by the same engine as the builder above. Use Load to put one into the builder and change it.
| Expression | What it does | Use |
|---|---|---|
cron(*/5 * * * ? *) | Runs every 5 minutes. Every 5 minutes. For a fixed interval, a rate() expression is simpler. | Load |
cron(0 * * * ? *) | Runs every hour, on the hour. | Load |
cron(0 9 * * ? *) | Runs at 9:00 AM every day. | Load |
cron(0 9 ? * MON-FRI *) | Runs at 9:00 AM every weekday (Mon-Fri). | Load |
cron(0 0 1 * ? *) | Runs at 12:00 AM on day 1 of every month. | Load |
cron(0 0 L * ? *) | Runs at 12:00 AM on the last day of every month. Last day of the month. Standard cron cannot do this. | Load |
cron(0 10 ? * FRIL *) | Runs at 10:00 AM on the last Friday of every month. Last Friday of the month. Friday is 6 on EventBridge. | Load |
cron(0 8 ? * MON#1 *) | Runs at 8:00 AM on the first Monday of every month. First Monday of the month. | Load |
The rules behind most AWS cron errors
- Exactly one
?in the day fields. EventBridge does not let you restrict day-of-month and day-of-week together. If you put a value or*in one, the other must be?. That is why a pasted Linux expression fails: it has*in both. - Five fields will not do. A Linux expression needs a
?in one day field and a year added at the end. The cron expression validator shows the converted form. - No faster than once a minute. Expressions that would run more often are not supported, and the best precision is one minute with a possible delay of several seconds.
#takes a single expression.3#1,6#3is not valid.- Use a rate expression for plain intervals. AWS describes rate expressions as simpler, and cron as the choice when you need detailed control.
EventBridge rules versus EventBridge Scheduler
AWS calls scheduled rules a legacy feature and recommends EventBridge Scheduler for invoking targets on a schedule. The practical differences for cron are:
| Item | Scheduled rules | EventBridge Scheduler |
|---|---|---|
| Time zone | UTC+0 | UTC, or an IANA time zone you set on the schedule |
| Cron syntax | Six fields, as above | Six fields, as above |
| Daylight saving time | Not applicable, UTC does not change | In a spring-forward change the skipped invocation is not run; in a fall-back change a schedule in the repeated hour runs once |
If you want 9:00 AM New York time all year, Scheduler with a time zone does it directly. With rules you would write the UTC hour and accept that it shifts by an hour in local time; see the cron timezone converter.
Sources and further reading
Use a tool
Try the schedule from this page in a tool.