I am getting CRON Job String format error while deploying code to to the aws

485 views Asked by At

I want to schedule the task for 17:00 PM every day(Monday through Friday). I have following expression. But I am getting "Error: Invalid cron string format at Cron.fromString......." while deploying to aws

...........
events:
  - schedule: 
        rate: cron(0 17 ? * MON-FRI *)
        timezone: Australia/Sydney

-> I also tried

  events:
  - schedule: 
        rate: cron(0 0 17 ? * MON-FRI *)
        timezone: Australia/Sydney
1

There are 1 answers

2
ExceptionNotThrownException On

The cron expression is wrong. Should be cron(0 17 ? * MON-FRI *).
You can check them for correctness in Amazon EventBridge:
Rules -> Create rule -> Schedule pattern