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系列——定时构建的更多相关文章

  1. 【Jenkins】定时构建语法

    跟cron定时任务语法基本类似 一.字段有哪些 每行包含5个字段,用制表符或空格隔开,从左至右依次是: 分 时 天 月 星期 二.每个字段的取值范围 分钟 (0–59) 时 (0–23) 天 (1–3 ...

  2. Jenkins配置定时构建项目

    general: 源码管理: 构建触发器: 构建后操作:

  3. Jenkins之定时构建

    参考文章:https://blog.csdn.net/ZZY1078689276/article/details/77520441 第一个*表示分钟,取值0~59 第二个*表示小时,取值0~23 第三 ...

  4. Jenkins环境搭建(4)-配置定时构建

    每次手动触发job构建,是很麻烦的一件事情,job中可以配置定时构建,今天就来分享下定时构建:构建分为两种:定时构建和轮询SCM. 一.定时构建 Jenkins采用了著名的UNIX任务调度工具CRON ...

  5. Jenkins 定时构建语法规则

    1.Jenkins自由风格任务定时构建 2.语法规则 定时构建语法 * * * * * 第一个*表示分钟,取值0~59 第二个*表示小时,取值0~23 第三个*表示一个月的第几天,取值1~31 第四个 ...

  6. jenkins持续集成:定时构建语法

    构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...

  7. git+jenkins持续集成三-定时构建语法

    构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...

  8. git+jenkins持续集成二-jenkins定时构建语法:定时构建语法

    构建位置:选择或创建工程_设置_构建触发器 1. 定时构建语法:* * * * * (五颗星,多个时间点,中间用逗号隔开)第一个*表示分钟,取值0~59第二个*表示小时,取值0~23第三个*表示一个月 ...

  9. Jenkins系列之-—06 Ant构建

    一.Ant 简介&构建环境 Apache Ant 是由 Java 语言开发的工具 构建ant环境: 1). 安装jdk,设置JAVA_HOME ,PATH ,CLASS_PATH 2). 下载 ...

随机推荐

  1. 2017-06-24(chgrp umask alias unalias)

    chgrp chgrp  组名  文件名 chgrp root newfile   将newfile的所属组修改为root umask umask 查看默认权限 0 022 文件的特殊权限 文件的默认 ...

  2. Java的IO系统

     Java IO系统     "对语言设计人员来说,创建好的输入/输出系统是一项特别困难的任务."     由于存在大量不同的设计方案,所以该任务的困难性是很容易证明的.其中最大的 ...

  3. MySql全文索引

    使用索引是数据库性能优化的必备技能之一.在MySQL数据库中,有四种索引:聚集索引(主键索引).普通索引.唯一索引以及我们这里将要介绍的全文索引(FULLTEXT INDEX). 全文索引(也称全文检 ...

  4. <%@include file="a.jsp"%> jsp引用jsp文件时候注意

    被包含的a.jsp文件:    a.jsp文件的page指令要么不要写.要么与主jsp文件的page指令一样.

  5. EL表达式和JSTL核心标签库

    1 EL表达式 1.1 EL的概述 EL,全名为Expression Language. 主要作用: ①EL表达式主要用于替换jsp页面中的脚本表达式,以便于从各种类型的web域中检索java对象(某 ...

  6. Linux开机时停在 Starting sendmail 不动了的解决方案

    目前遇到这个问题,是在修改了/etc/hosts之后,但停止在Starting sendmail后5分钟就进去了.以后再长时间进入不了系统,可以参考下面的方法. 造成这个问题一般是因为用户修改了机器名 ...

  7. AppScan 工作原理

    Rational AppScan(简称 AppScan)其实是一个产品家族,包括众多的应用安全扫描产品,从开发阶段的源代码扫描的 AppScan source edition,到针对 Web 应用进行 ...

  8. JAVA多线程之先行发生原则

    一.引子 如果java内存模型中所有的有序性都仅仅依靠volatile和synchronized来完成,那么有一些操作会变得很繁琐,但我们在编写java并发代码时并未感觉到这一点,这是因为java语言 ...

  9. easyui_datagrid 行内使用comobox的编码实现

    easyui datagrid组件的列属性中有一个editor属性,官方介绍如下: 所以,我们可以通过编码实现datagrid行内插入comobox的方式来实现某些场合的需要,具体编码实现如下: // ...

  10. ABP官方文档翻译 9.2 Entity Framework Core

    Entity Framework Core 介绍 DbContext 配置 在Startup类中 在模块PreInitialize方法中 仓储 默认仓储 自定义仓储 应用程序特定基础仓储类 自定义仓储 ...