cronkit.org
Cron expressions, explained and converted — in your browser

Cron tools › Platforms

AWS cron and rate expressions

cron() and rate() · 1 = SUN · UTC or a Scheduler time zone

Check an EventBridge cron(…) or rate(…) expression as you type, see when it fires in UTC or in an EventBridge Scheduler time zone, convert a Linux crontab line, and copy the CLI, CloudFormation or Terraform that deploys it.

Next runs

Convert from Unix cron

Deploy it

Try one

How to build an AWS cron expression

  1. Type the expression, with or without the cron( … ) wrapper, or a rate such as rate(5 minutes). It is checked as you type.
  2. Put ? in either day-of-month or day-of-week. EventBridge refuses * in both, and it refuses a value in both.
  3. Write the weekdays as names (MON-FRI). If you use numbers, 1 is Sunday and 7 is Saturday.
  4. Choose where it runs. An EventBridge rule always evaluates the expression in UTC; EventBridge Scheduler takes a time zone, and the run list then follows Scheduler's daylight-saving rule.
  5. Coming from a Linux crontab? Paste the line under Convert from Unix cron and press Use this. If the line needs two rules, both are loaded and both appear in the snippets.
  6. Copy the AWS CLI, CloudFormation or Terraform snippet under Deploy it.

The six fields of cron()

EventBridge wants all six fields, in this order, inside cron( ): cron(minutes hours day-of-month month day-of-week year).

FieldValuesNotes
Minutes0-59Nothing runs more often than once a minute.
Hours0-23UTC for rules; the schedule's zone for Scheduler.
Day-of-month1-31Also ?, L (last day) and W: 3W is the weekday nearest the 3rd.
Month1-12
Day-of-week1-7 or SUN-SAT1 = Sunday. Also ?, L and #: 6L is the last Friday, 3#2 the second Tuesday. No /, and only one #.
Year1970-2199Required. Use * for every year.

LW and L-2 work in Quartz but AWS does not document them, so the checker warns rather than guesses. For the full comparison with Linux and Quartz see the cron cheat sheet.

The day-of-week trap: 1 is Sunday

Linux cron counts the week from 0 = Sunday. EventBridge counts from 1 = Sunday, like Quartz. A 1-5 copied from a crontab is Monday–Friday on Linux and Sunday–Thursday on AWS, and nothing errors.

NumberLinux cronAWS EventBridge
0Sundayinvalid
1MondaySunday
2TuesdayMonday
5FridayThursday
6SaturdayFriday
7SundaySaturday
1-5Monday–FridaySunday–Thursday

Weekdays at 09:00 is 0 9 * * 1-5 on Linux and cron(0 9 ? * MON-FRI *) (or 2-6) on AWS. Names mean the same everywhere, which is why the converter writes them.

cron() or rate()?

A cron() fires at clock times. A rate() fires every so often, counted from when you create the rule or schedule, so rate(15 minutes) created at 10:07 is not the same as cron(0/15 * * * ? *), which fires at :00, :15, :30 and :45.

ExpressionValid?Why
rate(1 minute)yesvalue 1 takes the singular unit
rate(5 minutes)yesabove 1 takes the plural
rate(1 hours)noplural unit with 1
rate(5 hour)nosingular unit with 5
rate(30 seconds)nonothing faster than one minute; units are minute(s), hour(s), day(s)

Rules or Scheduler: which clock?

A scheduled EventBridge rule always evaluates its expression in UTC. AWS now calls scheduled rules legacy and recommends EventBridge Scheduler, which takes an IANA zone in --schedule-expression-timezone. In that zone Scheduler skips a time that the clocks jump over and runs a repeated hour once; the run list marks both cases. To move a UTC schedule to local time by hand, the time zone converter does the arithmetic.

FAQ

Why does EventBridge reject cron(0 12 * * * *)?

You cannot use * in both day-of-month and day-of-week: when one is * the other must be ?. Write cron(0 12 * * ? *). You also cannot give values in both fields; pick one and set the other to ?.

Can EventBridge run a job every 30 seconds?

No. Schedules faster than one minute are not supported, and rate() has no seconds unit. Run once a minute and loop inside the target if you need more.

Does an EventBridge rule follow daylight saving time?

No, a rule is always UTC, so a 09:00 UTC rule is 09:00 local only part of the year in zones with DST. Use EventBridge Scheduler with --schedule-expression-timezone to keep a local wall-clock time.

How do I run on the last day of the month or the second Tuesday?

cron(0 9 L * ? *) runs at 09:00 on the last day of every month. cron(0 9 ? * 3#2 *) runs on the second Tuesday (3 is Tuesday in AWS numbering). One day-of-week field can hold only one # expression.

Is anything I type sent to AWS or anywhere else?

No. The checks, the conversion and the run times are computed in this page's JavaScript; nothing leaves the browser.