3

I'm trying to get cron expression to trigger an event at 7:45 UTC on only working days -- Monday to Friday.

45 7 * * MON,TUE,WED,THU,FRI *
45 7 * * 1,2,3,4,5 *

Although the above expressions were supposed to work I am getting an Invalid CRON expression error raised on both and so how is the day of the week supposed to be to get it to work on only working days?

2 Answers2

3

It should be:

45 7 ? * MON,TUE,WED,THU,FRI *
Marcin
  • 215,873
  • 14
  • 235
  • 294
2

Could you please try this

45 7 ? * MON,TUE,WED,THU,FRI *
45 7 ? * 1,2,3,4,5 *

or

45 7 ? * MON-FRI *
45 7 ? * 1-5 *

More examples are available at https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-create-rule-schedule.html#eb-cron-expressions

Sri

Sri
  • 342
  • 4
  • 17