Groovy pipeline for automatic build trigger
prpeline{
.......
triggers{
cron('H 1,5 * * *')
}
.........
}
.......
triggers{
cron('H 1,5 * * *')
}
.........
}
CRON expression
A CRON expression is a string comprising five or six fields separated by white space[11] that represents a set of times, normally as a schedule to execute some routine.
Comments begin with a comment mark #, and must be on a line by themselves.
Field | Required | Allowed values | Allowed special characters | Remarks |
---|---|---|---|---|
Minutes | Yes | 0-59 | * , - | |
Hours | Yes | 0-23 | * , - | |
Day of month | Yes | 1-31 | * , - ? L W | ? L W only in some implementations |
Month | Yes | 1-12 or JAN-DEC | * , - | |
Day of week | Yes | 0-6 or SUN-SAT | * , - ? L # | ? L # only in some implementations |
Year | No | 1970-2099 | * , - | This field is not supported in standard/default implementations. |
Comments
Post a Comment