AWS Cron Expression Generator

AWS CloudWatch Events (now Amazon EventBridge) uses a 6-field cron format that differs from standard Linux cron. This guide covers the syntax for scheduling Lambda functions, ECS tasks, and other AWS resources.

AWS Cron Syntax (6 Fields)

minutes  hours  day-of-month  month  day-of-week  year
FieldValuesSpecial
Minutes0-59* , - /
Hours0-23* , - /
Day of Month1-31* , - / ? L W
Month1-12 or JAN-DEC* , - /
Day of Week1-7 or SUN-SAT* , - / ? L #
Year1970-2199* , - /
Warning: AWS day-of-week uses 1=SUN, 7=SAT. This differs from Linux cron (0=SUN, 6=SAT). A common source of errors.

Common AWS Cron Examples

ScheduleAWS ExpressionStandard Cron
Every 5 minrate(5 minutes)*/5 * * * *
Every hour0 * * * ? *0 * * * *
Daily midnight0 0 * * ? *0 0 * * *
Weekdays 9 AM0 9 ? * MON-FRI *0 9 * * 1-5
Monday noon0 12 ? * MON *0 12 * * 1
1st of month0 0 1 * ? *0 0 1 * *
Every 15 minrate(15 minutes)*/15 * * * *
Every 2 hoursrate(2 hours)0 */2 * * *

rate() vs cron()

rate() — Simple Intervals

Best for regular, repeating intervals:

rate(1 minute)
rate(5 minutes)
rate(1 hour)
rate(1 day)

Singular for rate of 1 (minute), plural for rates > 1 (minutes).

cron() — Complex Schedules

Best for specific times, days, or patterns:

cron(0 9 ? * MON-FRI *)    # Weekdays at 9 AM UTC
cron(0 0 1 * ? *)           # 1st of every month
cron(0 */6 * * ? *)         # Every 6 hours

AWS-Specific Rules

Setting Up a CloudWatch Rule

Create a scheduled rule via AWS CLI:

aws events put-rule \
  --name "DailyBackup" \
  --schedule-expression "cron(0 2 * * ? *)" \
  --state ENABLED

Add a Lambda target:

aws events put-targets \
  --rule "DailyBackup" \
  --targets "Id"="MyLambda","Arn"="arn:aws:lambda:us-east-1:123:function:backup"

FAQ

Why does AWS use ? instead of *?

To avoid ambiguity between dom and dow. If both are *, AWS can't determine whether to trigger on "every day" or "every weekday". ? in one field resolves this.

What timezone does AWS cron use?

UTC only. No built-in timezone support. Convert to UTC manually.

Can I mix rate() and cron()?

No. Each EventBridge rule uses either rate() or cron(). Create separate rules for different schedules. If you need both a simple interval and a specific time trigger for the same target resource, create two separate rules and attach the same target to both.

What happens if my cron expression triggers during a Daylight Saving Time change?

AWS cron expressions use UTC, which is not affected by Daylight Saving Time. However, if your target audience is in a timezone that observes DST, the local time of execution will shift by one hour during DST transitions. For example, a rule set to run at 9 AM UTC will run at 5 AM EST (UTC-4) during summer and 4 AM EST (UTC-5) during winter. Plan accordingly if the exact local time matters for your use case.

Need help? Use our free AWS cron generator to build and validate CloudWatch schedules visually.
Related Guides