简体   繁体   English

Cloud Scheduler 在每个月的第一个星期一触发

[英]Cloud scheduler trigger on the first monday of each month

I'm trying to schedule a job to trigger on the first Monday of each month:我正在尝试安排在每个月的第一个星期一触发的工作:

This is the cron expression I got: 0 5 1-7 * 1 (which,as far as I can read unix cron expressions, triggers at 5:00 am on Monday if it happens to be in the first 7 days of the month)这是我得到的 cron 表达式: 0 5 1-7 * 1 (据我所知,有 unix 个 cron 表达式,如果恰好在该月的前 7 天,则在周一凌晨 5:00 触发)

However the job is triggered on what seems to be random days at 5:00 am.然而,这项工作似乎是在凌晨 5:00 随机触发的。 the job was triggered today on the 16 of Aug!该工作于 8 月 16 日今天触发!

Am I reading the expression awfully wrong?我是不是读错了这个表达? BTW, I'm setting the timezone to be on AEST, if that makes difference.顺便说一句,我将时区设置为 AEST,如果这有所不同的话。

You can use the legacy cron syntax to describe the schedule.您可以使用旧的cron 语法来描述计划。

For your case, specify something like below:对于您的情况,请指定如下内容:
"first monday of month 05:00" “每月第一个星期一 05:00”

Do explore the "Custom interval" tab in the provided link, to get better understanding on this.请探索所提供链接中的“自定义间隔”选项卡,以更好地理解这一点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM