【发布时间】:2020-03-04 06:38:35
【问题描述】:
我正在尝试遵循 https://chalice.readthedocs.io/en/latest/topics/events.html 的文档
我试过了
@app.schedule('0 0 * * ? *')
def dataRefresh(event):
print(event.to_dict())
得到了这个错误:
botocore.exceptions.ClientError:发生错误 (ValidationException) 调用 PutRule 操作时:参数 ScheduleExpression 无效。
于是尝试了这个:
@app.schedule(Cron('0 0 * * ? *'))
def dataRefresh(event):
print(event.to_dict())
并得到另一个错误:
NameError:名称“Cron”未定义
没有任何效果...正确的语法是什么?
【问题讨论】:
标签: python amazon-web-services chalice