天青管道cron无法运行

时间:2020-07-31 11:37:52

标签: azure azure-pipelines

enter image description here

enter image description here

为什么cron不每两分钟运行一次

2 个答案:

答案 0 :(得分:0)

我认为应该是:

schedules:
- cron: '0 0/2 * 1/1 * ? *'
  displayName: success
  branches:
    include: master
  always: true

当我使用cron生成器评估您的cron字符串时,会出现错误,这使我认为问题是由于cron字符串错误所致。

这是我使用的工具:cronmaker

答案 1 :(得分:0)

为什么cron不每两分钟运行一次

cron语法*/2 * * * *应该有效。

我使用github资源和您的cron语法对其进行了测试:

enter image description here

结果:

enter image description here

因此,我可以确定您的cron语法*/2 * * * *是正确的。我们需要检查其他方面,例如:

  • 检查.yml文件中计划的修改是否已同步到github存储库。
  • success.yml创建新的管道,而无需进行其他任何设置。

如果上述方法对您没有帮助,则可以尝试使用相同的cron语法为Azure devops存储库而不是github rrpo创建管道,以检查是否仍然存在此问题,以便我们缩小此问题的范围。