【问题标题】:cron.yaml in Google App Engine: how to schedule task every hour at specific minute?Google App Engine 中的 cron.yaml:如何在特定分钟每小时安排一次任务?
【发布时间】:2014-01-12 08:48:50
【问题描述】:

在 Google App Engine 中,我想在每小时 10 分钟安排一次任务。我的意思是,每天 00:10、01:10、02:10、... 22:10 和 23:10:每点钟 + 十分钟。 crontab 等价物会是这样的

10 * * * * mytask

我的cron.yaml应该写什么?

cron:
- description: do something
  url: /myscript
  schedule: (?)

附:季节的问候,大家!

【问题讨论】:

标签: google-app-engine cron scheduling


【解决方案1】:
cron:
- description: do something
  url: /myscript
  schedule: every 1 hours from 00:10 to 23:10

来自Google App Engine Documentation

默认情况下,间隔计划在 上一份工作已经完成。但是,如果指定了 from...to 子句, 这些作业是定期安排的,与何时 上次完成的工作

因此,它将在 00:10,01:10.... 等运行

【讨论】:

  • 惊人的解决方案。谢谢!
猜你喜欢
  • 2018-07-05
  • 2012-02-05
  • 1970-01-01
  • 1970-01-01
  • 2017-08-19
  • 2010-12-02
  • 2015-05-05
  • 2016-11-27
  • 2015-08-05
相关资源
最近更新 更多