我试图设置一个appengine任务,在每天、每周、每月和每年的午夜重复执行,以清除游戏的高分列表。
我的亲信yaml看起来是这样的:
- description: daily clear
url: /delete?off=10
schedule: every day 00:00
- description: weekly clear
url: /delete?off=20
schedule: every monday 00:00
- description: monthly clear
url: /delete?off=30
schedule: every month 00:00
- description: yearly clear
url: /delete?off=40
schedule: every year 00:00
每天和每周的工作都可以,但我不知道如何让工作每月和每年都重复。这是the schedule format。
对于每个月的工作,我都尝试过“每个月”、“每月一号”等表达方式,但都没有奏效。在cron作业中可以使用这种调度吗?
或者我只需要每天00:00调用清除页面,然后在页面中执行此逻辑并测试当前日期(如果它是周/月/年的开始)?
您链接的文档提供了如何实现所需所有结果的示例。
我想这样说:
AFAIK在
yaml
中不能使用这样的语法,但是需要为每个不同的clear显式地定义一个路由,例如/delete/weekly
相关问题 更多 >
编程相关推荐