如何安排构建在詹金斯? [英] How schedule build in Jenkins?

查看:144
本文介绍了如何安排构建在詹金斯?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我如何安排詹金斯建立这样,这将是能够在特定的时间每​​天只能建?


例如,要在下午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

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

我只是试图找到一份工作在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.

这篇关于如何安排构建在詹金斯?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆