Jenkins系列——定时构建
1.环境说明
操作系统:win7旗舰版64bit
jdk:sun JDK1.7.0_80 64bit
tomcat:apache-tomcat-8.0.41
jenkins:2.32.3LST
本系列教程如果没有特殊说明,都会默认采用此环境。
2.定时构建的写法
勾选『Poll SCM』,点击输入框右边的帮助图标:
弹出的内容中详细解释了定时构建的用法,并给出了几个例子:
This field follows the syntax of cron (with minor differences). Specifically, each line consists of fields separated by TAB or whitespace:
MINUTE HOUR DOM MONTH DOW
MINUTE Minutes within the hour (–)
HOUR The hour of the day (–)
DOM The day of the month (–)
MONTH The month (–)
DOW The day of the week (–) where and are Sunday.
To specify multiple values for one field, the following operators are available. In the order of precedence, * specifies all valid values
M-N specifies a range of values
M-N/X or */X steps by intervals of X through the specified range or whole valid range
A,B,...,Z enumerates multiple values
To allow periodically scheduled tasks to produce even load on the system, the symbol H (for “hash”) should be used wherever possible. For example, using * * * for a dozen daily jobs will cause a large spike at midnight. In contrast, using H H * * * would still execute each job once a day, but not all at the same time, better using limited resources. The H symbol can be used with a range. For example, H H(-) * * * means some time between : AM (midnight) to : AM. You can also use step intervals with H, with or without ranges. The H symbol can be thought of as a random value over a range, but it actually is a hash of the job name, not a random function, so that the value remains stable for any given project. Beware that for the day of month field, short cycles such as */ or H/ will not work consistently near the end of most months, due to variable month lengths. For example, */ will run on the 1st, 4th, …31st days of a long month, then again the next day of the next month. Hashes are always chosen in the - range, so H/ will produce a gap between runs of between and days at the end of a month. (Longer cycles will also have inconsistent lengths but the effect may be relatively less noticeable.) Empty lines and lines that start with # will be ignored as comments. In addition, @yearly, @annually, @monthly, @weekly, @daily, @midnight, and @hourly are supported as convenient aliases. These use the hash system for automatic balancing. For example, @hourly is the same as H * * * * and could mean at any time during the hour. @midnight actually means some time between : AM and : AM. Examples: # every fifteen minutes (perhaps at :, :, :, :)
H/ * * * *
# every ten minutes in the first half of every hour (three times, perhaps at :, :, :)
H(-)/ * * * *
# once every two hours at minutes past the hour starting at : AM and finishing at : PM every weekday.
-/ * * -
# once in every two hours slot between AM and PM every weekday (perhaps at : AM, : PM, : PM, : PM)
H H(-)/ * * -
# once a day on the 1st and 15th of every month except December
3.示例
在22:21新建的项目,希望在22:22触发构建。
Jenkins系列——定时构建的更多相关文章
- 【Jenkins】定时构建语法
跟cron定时任务语法基本类似 一.字段有哪些 每行包含5个字段,用制表符或空格隔开,从左至右依次是: 分 时 天 月 星期 二.每个字段的取值范围 分钟 (0–59) 时 (0–23) 天 (1–3 ...
- Jenkins配置定时构建项目
general: 源码管理: 构建触发器: 构建后操作:
- Jenkins之定时构建
参考文章:https://blog.csdn.net/ZZY1078689276/article/details/77520441 第一个*表示分钟,取值0~59 第二个*表示小时,取值0~23 第三 ...
- Jenkins环境搭建(4)-配置定时构建
每次手动触发job构建,是很麻烦的一件事情,job中可以配置定时构建,今天就来分享下定时构建:构建分为两种:定时构建和轮询SCM. 一.定时构建 Jenkins采用了著名的UNIX任务调度工具CRON ...
- Jenkins 定时构建语法规则
1.Jenkins自由风格任务定时构建 2.语法规则 定时构建语法 * * * * * 第一个*表示分钟,取值0~59 第二个*表示小时,取值0~23 第三个*表示一个月的第几天,取值1~31 第四个 ...
- jenkins持续集成:定时构建语法
构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...
- git+jenkins持续集成三-定时构建语法
构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...
- git+jenkins持续集成二-jenkins定时构建语法:定时构建语法
构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...
- Jenkins系列之-—06 Ant构建
一.Ant 简介&构建环境 Apache Ant 是由 Java 语言开发的工具 构建ant环境: 1). 安装jdk,设置JAVA_HOME ,PATH ,CLASS_PATH 2). 下载 ...
随机推荐
- python_如何读写csv数据
案例: 通过股票网站,我们获取了中国股市数据集,它以csv数据格式存储 Data,Open,High,Low,Close,Volume,Adj Close 2016-06-28,8.63,8.47,8 ...
- 前端开发人员需要了解的CSS原理
转自http://web.jobbole.com/10011/ 一.浏览器的发展与CSS 网页浏览器主要通过HTTP协议连接网页服务器而取得网页,HTTP容许网页浏览器送交资料到网页服务器并且获取网页 ...
- OpenCv结构和内容
OpenCv的结构和内容 OpenCv源码组成结构其中包括cv, cvauex, cxcore, highgui, ml这5个模块 CV:图像处理和视觉算法 MLL:统计分类器 HighGui:GUI ...
- Linux使用top与free命令查看CPU与内存使用情况
top命令: 显示内容解释: 第一行top分别为:当前时间:系统运行天数:使用者个数:系统负载的平均值,后面的三个值分别为1分钟前.5分钟前.15分钟前进程的平均数,这个数值超过 CPU 数目时,说明 ...
- 解决Android中,禁止ScrollView内的控件改变之后自动滚动
<ScrollView android:id="@+id/scrollView1" android:layout_width="fill_parent" ...
- Bootstrap fileinput:文件上传插件的基础用法
官网地址:http://plugins.krajee.com/ 官网提供的样例:http://plugins.krajee.com/file-input/demo 基础用法一 导入核心CSS及JS文件 ...
- JavaScript之正则表达式(1)
一,在线工具: regexper.com 二 ,正则示例: (1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)(1)( ...
- Eralng的常用数据结构
1.记录(record) 适用于小数据,并且用属性名方便查找 2.Key/Value 类型 a.属性列表 就是类似[{Key, Value}]的列表,可以通过proplists模块来处理这样的列表 当 ...
- openstack开发基础
- oracle光标的使用
以下plsql程序用的scott用户的dept,emp表. 1.光标的使用: --查询并打印员工的姓名名和薪水 /* 光标属性: %found %notfound */ set serveroutpu ...