Gokul Thulaseedharan
Gokul Thulaseedharan

Reputation: 343

Serverless AWS schedule : ScheduleExpression is not valid

In serverless yml configuration, this is working

events: - schedule: rate(24 hours)

But, this is not

 `events:
  - schedule: cron(0 0 * * * *)`

nor this

 `events:
  - schedule: 
      rate : cron(0 0 * * * *)`

Upvotes: 0

Views: 2564

Answers (1)

Exelian
Exelian

Reputation: 5888

Either day-of-month or day-of-week must be a question mark.

Which one doesn't matter in your case. Using the following expression should work for your case: 0 0 * * ? *.

See the CloudWatch Events documentation for more information and examples of cronschedules. Your specific case is actually mentioned there.

Upvotes: 2

Related Questions