I have written a cron expression below:
0 13 * * 1-5
for triggering “At 13:00 on every day-of-week from Monday through Friday.”
But when I use it in cloudwatch events I replaced the day of the month with ? as stated in the aws docs. But this doesn't work and says Parameter ScheduleExpression is not valid
Minute Hour day(of the month) month day(of the week)
0 13 ? * 1-5
What am I missing here?
Thankyou!
As stated here.
Cron expressions have six required fields.
It worked after adding an extra
*for the year field.Also normal cron syntax uses 0-6 for sunday-saturday but for clouwatch events 1-7 is used for sunday-saturday.
AWS documentation