AWS cron syntax
An EventBridge expression looks like cron(0 12 * * ? *) and has six fields: minutes, hours, day of month, month, day of week and year. There is no seconds field, so the finest resolution is one minute. Days of the week run from 1 (Sunday) to 7 (Saturday), and names like MON-FRI work too.
Rules you must follow
One of the two day fields must be β?β: use cron(0 8 ? * MON-FRI *) for weekday mornings and cron(0 8 1 * ? *) for the first of the month. The year field is required; use * for every year. L, W and # are supported in the day fields, for example cron(0 18 L * ? *) for the last day of each month.
Time zones
Scheduled EventBridge rules always run in UTC, so the tool evaluates AWS expressions in UTC by default and shows your local time next to each run. EventBridge Scheduler can attach a time zone to a schedule; in that case pick the same zone in the time-zone selector to preview it correctly.
Cron or rate?
For fixed intervals such as every 15 minutes a rate expression is simpler: rate(15 minutes) starts counting when the rule is created. Use cron when the job must run at calendar times β 08:00 on weekdays, the last day of the month, or only in a given year. EventBridge Scheduler additionally supports one-time at(...) schedules and flexible time windows that spread invocations.
Frequently asked questions
- Why does AWS reject my cron expression?
- The usual causes are five fields instead of six, a missing year field, or no β?β in the day-of-month or day-of-week field. The error message names the field thatβs wrong.
- How do I run a Lambda every 5 minutes with cron?
- Use cron(0/5 * * * ? *). For simple intervals EventBridge also accepts rate(5 minutes).
- Is AWS cron in UTC?
- Yes for EventBridge rules. EventBridge Scheduler lets you set a time zone per schedule.
- What is the minimum interval?
- One minute, because AWS cron has no seconds field.