gpt4 book ai didi

amazon-web-services - AWS Cloudwatch 规则安排 Cron 表达式以在一天内跳过 2 小时

转载 作者:行者123 更新时间:2023-12-03 21:17:01 25 4
gpt4 key购买 nike

我想触发一个 AWS Lambda 函数,使用 Cloudwatch 规则,要求如下。

  • 条件 1 : 每日触发
  • 条件 2 : 每 5 分钟
  • 条件 3 : 它不应该在晚上 11 点到
    每天凌晨 1 点(维护窗口)。

  • 我读了 documentation on crons并且我无法想出一个 Cron 表达式来满足 条件 3 .我想出了以下表达式。
    0/5 ## * * ? *
    我该如何履行 条件 3 上文提到的?我已将其保留为 ##在 cron 表达式上。我很清楚时区。

    最佳答案

    您可以使用 cron 在线工具,例如

    https://crontab.guru/

    http://www.cronmaker.com/

    这是我根据您的要求创建的表达式

    */5 1-23 * * *

    enter image description here

    关于amazon-web-services - AWS Cloudwatch 规则安排 Cron 表达式以在一天内跳过 2 小时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59496652/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com