FREE TOOL

EventBridge Cron Expression Validator

Validate AWS cron, rate and at expressions for EventBridge Scheduler and rules, see the next run times in any time zone, and fix Unix cron.

  • Your data never leaves your browser: everything is calculated by JavaScript on this page, not on a server.
  • Nothing you enter is uploaded, processed on a server or stored. Check it in your browser's developer tools (Network tab).
  • Once the page has loaded, the tool works without an internet connection.

Schedule expression

cron(minutes hours day-of-month month day-of-week year), rate(value unit) or at(yyyy-mm-ddThh:mm:ss). Unix cron works too - you get the AWS version.

Where it runs

EventBridge Scheduler reads the expression in a time zone; scheduled rules always in UTC.

See next runs ↓

Create it

# The role lets EventBridge Scheduler invoke the target (lambda:InvokeFunction).
aws scheduler create-schedule --name my-schedule \
    --schedule-expression 'cron(0/15 8-17 ? * MON-FRI *)' \
    --flexible-time-window '{"Mode": "OFF"}' \
    --target '{"Arn": "arn:aws:lambda:us-east-1:123456789012:function:my-function", "RoleArn": "arn:aws:iam::123456789012:role/my-scheduler-role"}'
MySchedule:
  Type: AWS::Scheduler::Schedule
  Properties:
    ScheduleExpression: "cron(0/15 8-17 ? * MON-FRI *)"
    FlexibleTimeWindow:
      Mode: "OFF"
    Target:
      Arn: !GetAtt MyFunction.Arn
      RoleArn: !GetAtt MySchedulerRole.Arn
Scheduling Lambda with EventBridge is a typical AWS Developer Associate exam questionTry free DVA-C02 practice questions with answers and explanations.DVA-C02 questions →

AWS cron vs Unix cron

EventBridge cron looks like the crontab you know, and that is the trap: a Unix expression pasted into EventBridge is rejected or, worse, runs on the wrong days.

Unix cronAWS cron (EventBridge)
Fields5: minute hour day-of-month month day-of-week6: the same plus a year, wrapped in cron( )
Day of week0-6, Sunday = 0 (or 7)1-7, Sunday = 1, or SUN-SAT
Day-of-month and day-of-weekBoth can be set; the job runs when either matchesOne of them must be ?
Extras-L (last), W (nearest weekday), # (nth weekday of the month)
Time zoneThe server'sUTC, or any IANA time zone in EventBridge Scheduler

So 0 12 * * * (every day at noon) becomes cron(0 12 * * ? *), and 30 8 * * 1-5 (weekdays at 8:30) becomes cron(30 8 ? * 2-6 *) - or, clearer, cron(30 8 ? * MON-FRI *).

Cron fields and wildcards

FieldValuesWildcards
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, - * /
  • , adds values (MON,WED,FRI), - sets a range (8-17), * takes every value.
  • / sets an increment: 0/15 in minutes is 0, 15, 30 and 45.
  • ? means "any" in day-of-month or day-of-week - the field that is not used.
  • L is the last day of the month, or with a weekday the last one in the month: 6L is the last Friday.
  • W is the weekday nearest a day: 15W runs on the 15th, or on the Friday or Monday next to it when the 15th falls on a weekend.
  • # is the nth weekday of the month: 3#2 is the second Tuesday. It allows a single expression, not a list.

rate() and at() expressions

rate(value unit) runs at a fixed interval, in minutes, hours or days. The unit is singular for 1 and plural above it: rate(1 hour) and rate(5 hours) are valid, rate(1 hours) and rate(5 hour) are not. The interval counts from when the schedule is created, or from its start date in EventBridge Scheduler.

at(yyyy-mm-ddThh:mm:ss) runs once, in EventBridge Scheduler only. It has no time zone of its own: the schedule's time zone applies. A completed one-time schedule still counts against the account's quota, so delete it, or create it with --action-after-completion DELETE.

Time zones and daylight saving time

Scheduled rules run in UTC, always. EventBridge Scheduler takes an IANA time zone (--schedule-expression-timezone) and follows its daylight saving time:

  • when clocks go forward, a time that does not exist that day (02:30 in most of Europe and the US) is skipped;
  • when clocks go back, a time that happens twice runs only once.

The next runs above follow the same rules for the time zone you pick. A rate() in days is always 24 hours, whatever the clocks do.

EventBridge Scheduler vs scheduled rules

AWS calls scheduled rules legacy and recommends EventBridge Scheduler: it adds time zones, one-time schedules, flexible time windows, retries and many more targets. The cron and rate syntax is the same in both. Either way, runs have one-minute precision - a schedule for 1:00 fires between 1:00:00 and 1:00:59.

Where AWS cron is used

The same cron() and rate() syntax schedules much more than EventBridge, with a few service-specific limits:

ServiceDifferences from EventBridge Scheduler
Lambda schedules, ECS scheduled tasks, SAM Schedule and ScheduleV2 events, Serverless Framework schedule eventsNone - they create an EventBridge rule or schedule. A rule runs in UTC.
AWS Glue job and crawler triggersUTC only; at least 5 minutes between runs.
AWS Backup plansNone in the syntax; the time zone is the rule's ScheduleExpressionTimezone.
Systems Manager maintenance windows and State Manager associationsAn optional seconds field in front (7 fields); at least 5 minutes between maintenance windows and 30 minutes between associations, which also allow fewer day-of-week forms and no months.

Frequently asked questions

Why does EventBridge reject my cron expression?

Usually one of: five fields instead of six (the year is missing), both day-of-month and day-of-week set instead of a ? in one of them, day-of-week 0 for Sunday instead of 1, or a missing cron( ) around the fields. Paste it above - the validator names the field and suggests the fix.

Does this validator work for a Lambda cron schedule?

Yes. A scheduled Lambda function is invoked by EventBridge - a scheduled rule or EventBridge Scheduler - so its expression follows exactly these rules. Pick the service above to match how the schedule is created.

How do I run a schedule every 5 minutes?

rate(5 minutes), or cron(0/5 * * * ? *) to run at fixed minutes of the hour. Add hours or days to the cron to limit it, e.g. cron(0/5 8-17 ? * MON-FRI *) for office hours.

Can a schedule run every 30 seconds?

No. The shortest interval is one minute; AWS does not support expressions leading to faster rates.

Is my expression sent anywhere?

No. The validation runs in your browser: nothing you enter is uploaded, processed on a server or stored. The page only counts that the validator was used, the kind of expression and which mistakes were fixed, never the expression.

References

Schedule types in EventBridge Scheduler
Setting a schedule pattern for scheduled rules (legacy)
AWS CLI: create-schedule
Time-based schedules for jobs and crawlers (AWS Glue)
Cron and rate expressions for Systems Manager