问题描述
我如何安排詹金斯建立这样,这将是能够在特定的时间每天只能建?
例如,要在下午4点开始
How do I schedule a Jenkins build such that it would be able to build only at specific hours every day?
For example to start at 4 PM
0 16 1-7 * *
据我了解,为0分钟,在周一每月下午4时至周日,但它建立的每一分钟:(
I understand that as: 0 minutes, at 4 o'clock PM from Monday to Sunday every month, however it builds every minute :(
我会为任何建议表示感谢。谢谢!
I would be grateful for any advice. Thanks!
推荐答案
在您的例子告诉你6个领域,而是根据詹金斯自己的帮助(按钮?)为计划任务5个领域的指定方式:
In your example you show 6 fields, but according to Jenkins' own help (the "?" button) for the schedule task 5 fields are specified:
此字段遵循的cron的语法(轻微差异)。具体来说,每行由TAB或空格分开的5场:
MINUTE HOUR DOM月DOW
我只是试图找到一份工作在16:42启动(我大概当地时间),并将其与以下的工作,但它花费了大约30秒钟的额外
I just tried to get a job to launch at 4:42PM (my approximate local time) and it worked with the following, though it took about 30 extra seconds:
42 16 * * *
如果你想多次,我觉得有以下应该工作:
If you want multiple times, I think the following should work:
0 16,18,20,22 * * *
4,6,8,和下午10点每天
for 4, 6, 8, and 10 o'clock PM every day.
这篇关于如何安排构建在詹金斯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!