简体   繁体   English

AWS cloudwatch cron 事件

[英]AWS cloudwatch cron event

I want to setup a cloudwatch event which will get triggered in every X minutes, but should not be triggered at 0th minute.我想设置一个 cloudwatch 事件,该事件将在每 X 分钟触发一次,但不应在第 0 分钟触发。 ie it should be triggered at current time+X minutes, 2X minutes, 3X minutes etc. How can i do that.即它应该在当前时间+X 分钟、2X 分钟、3X 分钟等触发。我该怎么做。

Update: i had done setting up cloudwatch event, my only problem is crone expression.更新:我已经完成了 cloudwatch 事件的设置,我唯一的问题是 crone 表达式。 I want to get a cron expression which can schedule the event which start from 23rd minutes from the current time and at every 23rd minutes thereafter.我想得到一个 cron 表达式,它可以安排从当前时间的第 23 分钟开始的事件,此后每 23 分钟开始。

0/23 * * *? 0/23 * * *? * doesnt work because it gets triggered at 0th minute 23/23 * * *? * 不起作用,因为它在 23/23 的第 0 分钟触发 * * *? * doesnt work because 1st event may not be 23rd minutes apart from current time * 不起作用,因为第一个事件可能不是当前时间的第 23 分钟

Jay,杰伊,

You'll need to setup cloudwatch event for this.您需要为此设置 cloudwatch 事件。 Here's the link to it.这是它的链接 You can further look at the cron expression using this link .您可以使用此链接进一步查看 cron 表达式。 And, you can build the cron expression online using this link .而且,您可以使用此链接在线构建 cron 表达式。

The above mention links should fulfill your requirements.上述链接应满足您的要求。

Let me know if you need any further help.如果您需要任何进一步的帮助,请告诉我。 Thanks!谢谢!

UPDATE: As per your comments, following cron expression should fulfill your requirements.更新:根据您的评论,以下 cron 表达式应该满足您的要求。 You can check by pasting this expression here .您可以通过在此处粘贴此表达式进行检查。

0 23/23 * * * ? *

I think that you just want the events to be triggered at every:23 and:46 minutes.我认为您只想在每:23 和:46 分钟触发事件。

Here should be the correct cron expression:这里应该是正确的 cron 表达式:

23,46 * * * ? *

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

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