如何在00:00在Google Cloud Daily上运行Cron

问题描述

我有一项cron工作,每24小时运行一次

- description: "automatic renew a user after trial"
  url: /api/recursub
  schedule: every 24 hours
  retry_parameters:
    min_backoff_seconds: 2.5
    max_doublings: 5
  timezone: Europe/Madrid

但是我想将它安排在每天的午夜12点运行。

我在文档中看到了类似的内容

cron:
- description: "monday morning mailout"
  url: /mail/weekly
  schedule: every monday 09:00
  timezone: Australia/NSW

是否可以像这样每天运行时间表

时间表:每天00:00

解决方法

根据Official Documentation

[TYPE]: Custom intervals can include the every prefix to define a repetitive interval,or you can define a specific list of days in a month:
To define a repetitive interval you can use the every prefix.

Examples:

schedule: every day 00:00
schedule: every monday 09:00

相关问答

依赖报错 idea导入项目后依赖报错,解决方案:https://blog....
错误1:代码生成器依赖和mybatis依赖冲突 启动项目时报错如下...
错误1:gradle项目控制台输出为乱码 # 解决方案:https://bl...
错误还原:在查询的过程中,传入的workType为0时,该条件不起...
报错如下,gcc版本太低 ^ server.c:5346:31: 错误:‘struct...