AWS EventBridge Cron
Amazon's 6-field cron for EventBridge Scheduler and CloudWatch Events — adds a year field, drops compatibility with `*`-in-both-day-fields.
Overview
AWS EventBridge (and the legacy CloudWatch Events) uses a 6-field cron expression with an explicit year column. The fields are `minute hour day-of-month month day-of-week year`.
The two big surprises versus Unix: (1) one of day-of-month or day-of-week MUST be `?`, never both `*`; (2) day-of-week is 1-indexed (Sun=1).
Field Structure
Field Order6 fields: minute hour day-of-month month day-of-week year
Day-of-Week1=Sunday, 2=Monday, …, 7=Saturday. Also accepts `SUN-SAT`.
Special Characters
| Token | Meaning |
|---|---|
| * | Any value. |
| , | List separator. |
| - | Range. |
| / | Step. |
| ? | “No specific value” — required in either DOM or DOW, but not both. |
| L | Last (e.g. `L` in DOM = last day of month; `6L` in DOW = last Friday). |
| W | Nearest weekday (e.g. `15W` = weekday closest to the 15th). |
| # | Nth weekday (e.g. `2#1` = first Monday). |
Aliases
- Not supported — no `@hourly` etc.
Comparison vs. Unix Cron
| Feature | AWS EventBridge Cron | Unix Cron |
|---|---|---|
| Field count | 6 (year added) | 5 |
| Seconds field | No (year, not seconds) | No |
| Step syntax | Yes | Limited |
| Named months/days | Yes (JAN-DEC, SUN-SAT) | No |
| Aliases | No | No |
| DOW numbering | 1=Sun … 7=Sat | 0=Sun … 6=Sat |
| DOM vs DOW | One must be `?` | OR when both restricted |
| `L`, `W`, `#` tokens | Yes | No |
Examples
Gotchas & Pitfalls
- ⚠Expressions go inside `cron( … )` in the EventBridge API, but the inner pattern is what you pass to cron parsers.
- ⚠Times are evaluated in UTC unless the EventBridge Scheduler timezone field is set.
- ⚠EventBridge does NOT use seconds — the extra field versus Unix cron is `year`, not `seconds`.
- ⚠One of DOM or DOW must be `?`. `* * * * * *` is invalid.