In serverless.yml, for one function, my events section is this:
events:
- schedule:
rate: cron(55 7-23 * * * *)
When I attempt to deploy, I get this error:
Serverless Error ---------------------------------------
An error occurred while provisioning your stack: AlertEventsRuleSchedule1
- Parameter ScheduleExpression is not valid..
This AWS doco page seems to indicate this syntax is OK:
http://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html
The same error results when the final "*" is removed
Thanks for reporting @chris-hailstorm 馃憤
This issue is related to https://github.com/serverless/serverless/issues/2344
Hey @chris-hailstorm
cron expression is wrong, because
You can't specify the Day-of-month and Day-of-week fields in the same Cron expression. If you specify a value in one of the fields, you must use a ? (question mark) in the other.
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions
Closing as it's not an issue.
Most helpful comment
Hey @chris-hailstorm
cron expression is wrong, because
https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html#CronExpressions
Closing as it's not an issue.