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
MINUTE Minutes within the hour (0-59) HOUR The hour of the day (0-23) DOM The day of the month (1-31) MONTH The month (1-12) DOW The day of the week (0-7) where 0 and 7 are Sunday.
To specify multiple values for one field, the following operators are available. In the order of precedence,
'*' can be used to specify all valid values.
'M-N' can be used to specify a range, such as "1-5"
'M-N/X' or ' /X' can be used to specify skips of X''s value through the range, such as " /15" in the MINUTE field for "0,15,30,45" and "1-6/2" for "1,3,5"
'A,B,...,Z' can be used to specify multiple values, such as "0,30" or "1,3,5"
Empty lines and lines that start with '#' will be ignored as comments. In addition, @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourly are supported.
This fieldfollowsthesyntaxofcron (withminordifferences). Specifically, each lineconsistsof 5 fieldsseparatedbyTABor whitespace:
MINUTEHOURDOMMONTHDOW
MINUTEMinuteswithinthehour (0-59)
HOURThehouroftheday (0-23)
DOMThedayofthemonth (1-31)
MONTHThemonth (1-12)
DOWThedayoftheweek (0-7) where 0 and 7 areSunday.
To specifymultiplevaluesfor onefield, thefollowingoperatorsareavailable. In theorderofprecedence,
* '*' canbeusedto specifyallvalidvalues.
* 'M-N' canbeusedto specify a range, suchas "1-5"
* 'M-N/X' or '*/X' canbeusedto specifyskipsof X''s valuethroughtherange, suchas "*/15" in theMINUTEfieldfor "0,15,30,45" and "1-6/2" for "1,3,5"
* 'A,B,...,Z' canbeusedto specifymultiplevalues, suchas "0,30" or "1,3,5"
Emptylinesand linesthatstartwith '#' willbeignoredas comments.
In addition, @yearly, @annually, @monthly, @weekly, @daily, @midnight, @hourlyaresupported.
The following variables are available to shell scripts
BUILD NUMBER The current build number, such as "153" BUILD ID The current build id, such as "2005-08-22 23-59-59" (YYYY-MM-DD hh-mm-ss) BUILD DISPLAY NAME The display name of the current build, which is something like "#153" by default. JOB NAME Name of the project of this build, such as "foo" or "foo/bar". (To strip off folder paths from a Bourne shell script, try: ${JOB NAME##*/}) BUILD TAG String of "jenkins-${JOB NAME}-${BUILD NUMBER}". Convenient to put into a resource file, a jar file, etc for easier identification. EXECUTOR NUMBER The unique number that identifies the current executor (among executors of the same machine) that’s carrying out this build. This is the number you see in the "build executor status", except that the number starts from 0, not 1. NODE NAME Name of the slave if the build is on a slave, or "master" if run on master NODE LABELS Whitespace-separated list of labels that the node is assigned. WORKSPACE The absolute path of the directory assigned to the build as a workspace. JENKINS HOME The absolute path of the directory assigned on the master node for Jenkins to store data. JENKINS URL Full URL of Jenkins, like http://server:port/jenkins/ (note: only available if Jenkins URL set in system configuration) BUILD URL Full URL of this build, like http://server:port/jenkins/job/foo/15/ (Jenkins URL must be set) JOB URL Full URL of this job, like http://server:port/jenkins/job/foo/ (Jenkins URL must be set) SVN REVISION Subversion revision number that's currently checked out to the workspace, such as "12345" SVN URL Subversion URL that's currently checked out to the workspace.
Thefollowingvariablesareavailableto shellscripts
BUILD_NUMBER
Thecurrentbuildnumber, suchas "153"
BUILD_ID
Thecurrentbuildid, suchas "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss)
BUILD_DISPLAY_NAME
Thedisplaynameofthecurrentbuild, whichis somethinglike "#153" bydefault.
JOB_NAME
Nameoftheprojectofthis build, suchas "foo" or "foo/bar". (To stripofffolderpathsfrom a Bourneshellscript, try: ${JOB_NAME##*/})
BUILD_TAG
String of "jenkins-${JOB_NAME}-${BUILD_NUMBER}". Convenientto putinto a resourcefile, a jarfile, etcfor easieridentification.
EXECUTOR_NUMBER
Theuniquenumberthatidentifiesthecurrentexecutor (amongexecutorsofthesamemachine) that’s carryingoutthis build. This is thenumberyouseein the "build executor status", exceptthatthenumberstartsfrom 0, not 1.
NODE_NAME
Nameoftheslaveif thebuildis on a slave, or "master" if runonmaster
NODE_LABELS
Whitespace-separatedlistoflabelsthatthenodeis assigned.
WORKSPACE
Theabsolutepathofthedirectoryassignedto thebuildas a workspace.
JENKINS_HOME
Theabsolutepathofthedirectoryassignedonthemasternodefor Jenkinsto storedata.
JENKINS_URL
FullURLofJenkins, likehttp://server:port/jenkins/ (note: only available if Jenkins URL set in system configuration)
BUILD_URL
FullURLofthis build, likehttp://server:port/jenkins/job/foo/15/ (Jenkins URL must be set)
JOB_URL
FullURLofthis job, likehttp://server:port/jenkins/job/foo/ (Jenkins URL must be set)
SVN_REVISION
Subversionrevisionnumberthat's currently checked out to the workspace, such as "12345"
SVN_URL
Subversion URL that's currentlycheckedoutto theworkspace.