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, 2019 in Jenkins by Neel
• 3,020 points

retagged Jun 19, 2019 by Kalgi 9,058 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, 2019 by Arvind
• 3,040 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, 2019 by Sirajul
• 59,230 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,300 points
0 votes
1 answer

How do I know who has performed a particular operation in jenkins?

You can keep a log of who ...READ MORE

answered May 30, 2019 in Jenkins by Sirajul
• 59,230 points
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,680 points
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+2 votes
1 answer
+1 vote
3 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, 2019 in Jenkins by Sirajul
• 59,230 points
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, 2019 in Jenkins by Sirajul
• 59,230 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP