Google Cloud Scheduler 基于工作日的不同频率(2 行 cron)

Google Cloud Scheduler different frequency based on weekdays (2 lines of cron)

我有一份工作,我想 运行 周一至周六每 15 分钟一次,但周日每 5 分钟一次,我尝试向 Cloud Scheduler 输入以下内容,但它说格式无效:

*/15 * * * 1-6, */5 * * * 0

2行cron不允许吗?我是否需要创建 2 个相同的作业并为它们设置不同的时间表?

我认为他们需要在 2 条不同的线上,而不是逗号分隔:

*/15 * * * 1-6
*/5 * * * 7

这是来自 GCP docs 的一行:

You can define a schedule so that your job runs multiple times a day, or runs on specific days and months. A schedule is described using the unix-cron string format (* * * * *), which is a set of five values in a line, indicating when the job should be executed.

也就是说,每个作业只能有 1 个计划。您最后一个问题的答案是。如果您有多个计划,则每个计划都必须配置为单独的作业。