- Newest
- Most votes
- Most comments
The behavior you're observing with AWS EventBridge Scheduler's cron expressions isn't necessarily a bug, but rather reflects the complexity of how the W character (weekday nearest) works in combination with other cron expression elements.
For your first expression cron(30 4 31W * ? *):
The W modifier means "the nearest weekday to the given day." When you specify 31W, it's looking for the nearest weekday to the 31st of each month. If a month doesn't have 31 days, it skips that month entirely rather than finding the nearest weekday to the last day of that month. For May 2026, May 31 falls on a Sunday, so the scheduler should select Friday, May 29 (the nearest weekday). Similarly, for October 2026, October 31 falls on a Saturday, so it should select Friday, October 30. The fact that these dates are missing suggests there might be an issue with how the scheduler is handling the W modifier for specific months.
For your second expression cron(30 4 15/5,22W * ? *):
This is a complex expression combining multiple day-of-month selectors. The 15/5 means "starting at day 15, every 5 days" and 22W means "the weekday nearest to day 22." The scheduler appears to be correctly adjusting to weekdays when the specified date falls on a weekend.
For your third expression cron(30 4 15/5,22W,27 * ? *):
Adding the 27th day to the mix changes the behavior. The scheduler now seems to be treating the 15/5 part differently, not adjusting for weekdays as it did in the second expression. The appearance of November 22 makes sense because of the 22W part, but the overall behavior does seem inconsistent with the previous expression.
These inconsistencies suggest that there might be some edge cases in how EventBridge Scheduler interprets complex cron expressions, especially when combining the W modifier with other selectors. For critical scheduling needs, I would recommend:
- Use simpler cron expressions when possible
- Always verify the next trigger dates shown in the console
- Consider implementing additional validation in your application logic
- For complex scheduling requirements, you might need to create multiple simpler schedules instead of one complex one
If these behaviors are causing issues for your application, you may want to contact AWS Support for clarification on the expected behavior.
Sources
Bug?: AWS EventBridge Rate based scheduler Ignores End Date | AWS re:Post
AWS EventBridge Scheduler Rules Fire Immediately After Terraform Deployment Outside Scheduled Window | AWS re:Post
What is Amazon EventBridge Scheduler? - EventBridge Scheduler
cron(30 4 31W * ? *) runs on the nearest weekday to 31st. Months that don't have 31st will be skipped. If your intention is to run on the last weekday of the month, change it to cron(30 4 LW * ? *).
cron(30 4 15/5,22W * ? *) means
- Every month’s 15, 20, 25, 30 and
- The weekday nearest to the 22nd (so if the 22nd falls on a weekend, it adjusts to Friday or Monday).
So, the key question is why the dates are different after adding 27th. You are correct that it should not change the other dates. It’s due to how AWS interprets combined day-of-month expressions, especially when mixed with “W” (weekday-nearest) and increments (like `/”). You should raise an AWS Support ticket and ask for detail explanation.
but shouldn't the document atleast mention these caveats? See i am making a frontend where people will be able to enter the schedule they want, now if such inconsistencies are there, it would affect the credibility of my application right.
So, what is my way forward? Either these behaviors are documented so that people who are making something on top of this can make that state not achievable , or fix these errors
The first one where the suggestion is that use LW, but what if i wanted something run only in months with 31st days and the last weekday of the 31st month, one could go mistakenly set it 31W right, thinking it will skip, 30 or less, day months.
So please guide me how i can get these things addressed either document such possible scenarios as invalid or something or fix these behaviours as per the expectation which the aws documents themselves claim.
Relevant content
asked 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 8 months ago

i hear you AI, but i think i would want a human to look at it and tell me, just saying things are inconsistent doesn't evoke confidence in using the service. So if somebody could look into it and fix some of these erratic behaviours and document them in the documentation on using cron in eventbridge scheduler. That would go a long way in building trust and confidence.