How do I schedule job periodically in Jenkins?

0 votes
I want a job to run periodically after every hour. From the configure job there is one checkbox called build periodically. In that I have to enter an expression for the job. What is the format for this expression? Is the procedure that I am following correct?
Jun 18 in Jenkins by Neel
• 3,010 points

retagged Jun 19 by Kalgi 108 views

2 answers to this question.

0 votes
I think the expression * 1 * * * should work if you want to run the job at every hour of the day. let me explain you the meaning of each notation.

* means any value

Minutes in one hour (0-59)

Hours in one day (0-23)

Day in a month (1-31)

Month in a year (1-12)

Day of the week (0-7)
answered Jun 18 by Arvind
• 2,960 points
0 votes

The format is as follows:

MINUTE (0-59), HOUR (0-23), DAY (1-31), MONTH (1-12), DAY OF THE WEEK (0-6)

The letter H, representing the word Hash can be inserted instead of any of the values. It will calculate the parameter based on the hash code of you project name.

This is so that if you are building several projects on your build machine at the same time, let’s say midnight each day, they do not all start their build execution at the same time. Each project starts its execution at a different minute depending on its hash code.

You can also specify the value to be between numbers, i.e. H(0,30) will return the hash code of the project where the possible hashes are 0-30.

For Example:

Start build daily in the late afternoon between 4:00 p.m. - 4:59 p.m. or 16:00 -16:59 depending on the projects hash: H 16 * * 1-5

answered Aug 2 by Sirajul
• 36,220 points

Related Questions In Jenkins

0 votes
1 answer
0 votes
1 answer

How can I create global macros and templates in jenkins job builder?

you can append the path to the ...READ MORE

answered Apr 2, 2018 in Jenkins by ajs3033
• 7,280 points
352 views
0 votes
1 answer
0 votes
1 answer

How do I pass value from my Fake # script to the host build server (Jenkins)

You can use the EnvInject plugin to pass environment ...READ MORE

answered Jul 11, 2018 in Jenkins by Kalgi
• 2,620 points
103 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
208 views
0 votes
1 answer
0 votes
2 answers

How to auto build a job in jenkins if there is any change in code on Github repository?

To automatically run build on code commit, follow ...READ MORE

answered Jul 31 in Jenkins by Sirajul
• 36,220 points
229 views
0 votes
2 answers

How to disable or reset security settings in Jenkins?

One other way would be to manually ...READ MORE

answered Aug 2 in Jenkins by Sirajul
• 36,220 points
38 views