Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cron syntax rejected #2781

Closed
chris-hailstorm opened this issue Nov 23, 2016 · 3 comments
Closed

Cron syntax rejected #2781

chris-hailstorm opened this issue Nov 23, 2016 · 3 comments
Labels

Comments

@chris-hailstorm
Copy link

This is a Bug Report

Description

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

Additional Data

  • Serverless Framework Version you're using: 1.1.0
  • Operating System: OSX Sierra
@chris-hailstorm
Copy link
Author

The same error results when the final "*" is removed

@pmuens pmuens added the bug label Nov 24, 2016
@pmuens
Copy link
Contributor

pmuens commented Nov 24, 2016

Thanks for reporting @chris-hailstorm 👍

This issue is related to #2344

@mthenw
Copy link
Contributor

mthenw commented Nov 30, 2016

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.

@mthenw mthenw closed this as completed Nov 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants