Skip to content
cron.surf

Run an AWS EventBridge schedule on the first Monday of every month

The AWS EventBridge expression for “First Monday of the month” is cron(0 9 ? * 2#1 *). Below: config you can paste, the next run times, and what to watch out for. AWS EventBridge Scheduler takes cron() with six fields, minutes to year, in the time zone you set (UTC by default).

cron(0 9 ? * 2#1 *)Open in tool

“At 09:00, on the first Monday of the month”

EventBridge Scheduler

AWS CLI (EventBridge Scheduler)
aws scheduler create-schedule \
  --name first-monday-of-month \
  --schedule-expression "cron(0 9 ? * 2#1 *)" \
  --schedule-expression-timezone "UTC" \
  --flexible-time-window Mode=OFF \
  --target '{"Arn":"arn:aws:lambda:REGION:ACCOUNT:function:my-job","RoleArn":"arn:aws:iam::ACCOUNT:role/scheduler-invoke"}'
Terraform
resource "aws_scheduler_schedule" "first_monday_of_month" {
  name                         = "first-monday-of-month"
  schedule_expression          = "cron(0 9 ? * 2#1 *)"
  schedule_expression_timezone = "UTC"

  flexible_time_window {
    mode = "OFF"
  }

  target {
    arn      = aws_lambda_function.job.arn
    role_arn = aws_iam_role.scheduler.arn
  }
}

AWS EventBridge gotchas

Six fields inside cron()Minutes, hours, day of month, month, day of week, year. There is no seconds field.
One day field must be ?If you set day of month, write ? for day of week, and the other way round. Setting both is an error.
Sunday is 1Day of week runs 1-7 from SUN, so 2-6 is Monday to Friday.
No step in day of weekDay of week takes lists, ranges, L and one #, but not /. List the days instead.

FAQ

What is the AWS EventBridge cron expression for “First Monday of the month”?

cron(0 9 ? * 2#1 *). It reads: At 09:00, on the first Monday of the month

Which time zone does a AWS EventBridge schedule use?

EventBridge Scheduler takes --schedule-expression-timezone with an IANA name and defaults to UTC. Older EventBridge rules only run in UTC.

What is the difference between rate() and cron()?

rate(5 minutes) runs at a fixed interval from when the schedule starts; cron() runs at clock times. Use cron() when the minute matters.

EventBridge Scheduler or EventBridge rules?

AWS recommends EventBridge Scheduler for new schedules: it supports time zones and one-time schedules. Rules only run in UTC.