I am trying to follow the documentation from https://chalice.readthedocs.io/en/latest/topics/events.html
I tried this
@app.schedule('0 0 * * ? *')
def dataRefresh(event):
print(event.to_dict())
and got this error:
botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the PutRule operation: Parameter ScheduleExpression is not valid.
and so tried this:
@app.schedule(Cron('0 0 * * ? *'))
def dataRefresh(event):
print(event.to_dict())
and got this other error:
NameError: name 'Cron' is not defined
Nothing works... what's the correct syntax?