如何每天一次自动执行詹金斯工作

时间:2018-06-28 11:08:22

标签: jenkins jenkins-pipeline

在詹金斯的工作中,我们有一个“定期构建”选项。那么,在IST时间10:30 pm自动运行作业的参数是什么。

我尝试使用30 22 * * TZ = IST作为参数,但对我不起作用。

1 个答案:

答案 0 :(得分:2)

单击时间表框旁边的问号,以获取语法的完整说明。
它说:

ax.set_title((idx[0],idx[1],idx[2]), loc='center'); 

因此,您需要输入:

This field follows the syntax of cron (with minor differences). Specifically, each line consists of 5 fields separated by TAB or whitespace:

MINUTE HOUR DOM MONTH DOW

MINUTE  Minutes within the hour (0–59)
HOUR    The hour of the day (0–23)
DOM The day of the month (1–31)
MONTH   The month (1–12)
DOW The day of the week (0–7) where 0 and 7 are Sunday.

关于时区,文档说明:

30 22 * * * 

因此,您完整的cron条目是:

Time zone specification

Periodic tasks are normally executed at the scheduled time in the time zone of 
the Jenkins master JVM (currently Europe/Berlin). This behavior can optionally 
be changed by specifying an alternative time zone in the first line of the field. 
Timezone specification starts with TZ=, followed by the ID of a time zone.