Jenkins 使用定时参数构建的 cron 表达式

huangapple go评论77阅读模式
英文:

Jenkins Build periodically with parameters cron expression

问题

0 23 ? * FRI#3

英文:

I only want to run once in a month, every 3rd Friday at 11 pm. I tried a cron expression “0 23 ? * FRI#3” in the Jenkinsfile. It shows a syntax error. What would be the correct expression?

        parameterizedCron('''
            0 23 ? * FRI#3 %INPUT-CHOICE=XXX; HOSTS=YYY
        ''')

答案1

得分: 0

已翻译:在每月的15日至21日(15-21)运行,每月的第3个星期五(5),在23:00/11 PM时运行(0 23)。每月的15日至21日只会出现一个星期五。

英文:

I am not sure FRI#3 is supported, but you can emulate that behavior with 0 23 15-21 * 5

Translated: run at 23:00/11 PM (0 23), on a Friday (5), on the 15th up to and including the 21th (15-21) day of the month, each month (*). On the 15-21th day of each month only one Friday can occur; the 3rd Friday of the month.

huangapple
  • 本文由 发表于 2023年8月10日 22:42:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76876819.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定