Run an AWS EventBridge schedule every 10 seconds
AWS EventBridge has no exact expression for “Every 10 seconds”. Here is why, a workaround, and the platforms that can do it. AWS EventBridge Scheduler takes cron() with six fields, minutes to year, in the time zone you set (UTC by default).
Why AWS EventBridge can’t do this exactly
Defined on Quartz as */10 * * * * ? · “Every 10 seconds”
second: AWS EventBridge has no seconds field, so it cannot run at seconds other than 0.
WorkaroundRun every minute and repeat inside the job with sleep, or use a scheduler that has seconds (Spring, Quartz, a systemd timer).
AWS EventBridge gotchas
FAQ
What is the AWS EventBridge cron expression for “Every 10 seconds”?
There is none that matches exactly. AWS EventBridge has no seconds field, so it cannot run at seconds other than 0.
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.