无效的 CRON 表达式 0 */8 * * *

发布于 2025-01-19 06:14:13 字数 481 浏览 3 评论 0原文

我正在尝试使用AWS CloudWatch服务。在里面,我正在创建一个合成的金丝雀。

对于时间表,我正在插入带有值0 */8 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *。

基本上,我想每天每8小时执​​行一次。

但是AWS Cron检查器告诉它是错误的表达。我已经检查了各种链接,但是到处都有相同的表达。

我不确定上述表达情况有什么问题。

I am trying to use AWS Cloudwatch service. Inside that I am create a Synthetic Canary.

And for the schedule I am inserting a cron job with value 0 */8 * * * .

Basically I want to execute it every 8 Hours, Every Day.

But the AWS Cron checker tells that it is wrong expression. I've checked various links but everywhere same expression is there.

I am not sure what is wrong with above expression.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

蓝眸 2025-01-26 06:14:13

如果需要每8小时执​​行一次,那么您可以使用RATE提供在这里

对于cron表达方式是:

0 0/8 * * ? *

您可以阅读 a>更多。

If this needs to be executed every 8 hours, then you can Schedule expressions using the rate as provided here.

For CRON expression will be:

0 0/8 * * ? *

You can read here more.

唯憾梦倾城 2025-01-26 06:14:13

CloudWatch合成金丝雀的新表达式有所不同,
我们需要5个值。
让我们通过以下表达式,

0/30 6-7,12-13,18-19 * *?

0/30->每30分钟,您可以在这里每5分钟,10分钟等一次。6-7,12-13,18-19-

>在6-7 UTC,12-13 UTC等之间。

  • - >一天可能是1-31,您的愿望或 *日常

  • - >月份可能是1-12或1月至12月的月份,或 *每月

  • - >一周中的一天可能是1-7,也可以是阳光,或 *每天 *

*
您可以使用

0 6,14,22 * *? - >每天8个小时一次。

New Expressions for Cloudwatch Synthetic Canary differs,
We need 5 values.
Lets go through the below expression,

0/30 6-7,12-13,18-19 * * ?

0/30 --> Every 30 minutes, Here you can use every 5 minutes, 10 minutes, etc..

6-7,12-13,18-19 --> Between 6-7 UTC , 12-13 UTC and so on.

  • --> Day which could be 1-31, your wish or * for everyday

  • --> Month which could be 1-12 or JAN-DEC or * for every month

  • --> Day of the week could be 1-7 or SUN-SAT or * for everyday

For your Case,
You can use

0 6,14,22 * * ? --> 8 hours once, everyday.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文