Configuring the Jenkins polling interval to: * * * * *
will poll the SCM for every minute.
Is there a way to configure it to poll less than a minute? for example every 30 seconds?

- 28,904
- 13
- 79
- 85

- 305
- 3
- 7
- 19
-
Just curious...why do you need this? – Jeff Olson May 10 '13 at 15:19
-
2Sometimes there are two commits submitted in the same minute. Jenkins won't build them both. It will build only the latest commit. I want to build them both. – Avi Rosenfeld May 10 '13 at 19:33
-
1But if the two changes were submitted within 30 seconds of each other, your problem is still not resolved. Even if you could poll every second, you'd still potentially have two changes checked in within a second of each other. It seems that @Stuart_Whelan's answer is correct...you need to approach this differently and get the SCM to trigger your builds instead of polling for changes. – Jeff Olson May 10 '13 at 20:19
-
I have added some more information to my answer now that I know more about the issue. – Stuart Whelan May 12 '13 at 21:05
-
You can configure like this under configuration for pipeline job - only for 1 min [](https://i.stack.imgur.com/ABdZX.png) – Sangy05 Jun 18 '21 at 06:49
3 Answers
Jenkins uses Cron syntax for polling. Not sure you can get to 30 seconds since Cron has a 60 sec granularity.
Check out this: How to get a unix script to run every 15 seconds?
Get your SCM to trigger the build instead of polling for it.
What SCM are you using?
Edit:
You can tell Jenkins to wait 'x' seconds after the check in change before starting the build. I have the same issue, dev's doing multiple check ins.
There are two options to configure this, a system wide option or a per-job option.
The system wide option is under Manage -> Configure System -> Quiet Period. It is in seconds.
The per job option is under Advanced Project Options, and is also called Quiet Period.
If you set quiet period to 90, Jenkins will wait until 90 seconds after the last detected check in before starting the build.

- 385
- 3
- 9
-
I'm using Perforce, but I'm not the administrator of the Perforce web server. Is it possible to trigger the build using the Jenkins Perforce plugin? – Avi Rosenfeld May 10 '13 at 04:52
-
1Reading the Wiki for the preforce plugin, it does not look as if it supports event base build triggers. The quiet period may be your best option. – Stuart Whelan May 12 '13 at 21:11
-
I don't mind people providing other options, but keep in mind that some people can't have the SCM trigger the build for environmental reasons... just saying – TheCodingArt Jul 21 '16 at 14:23
-
Polling is generally poor design. For anyone using Git and GitHub, you can switch to build on every commit through webhooks. Jenkins has a [GitHub Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Plugin) and [Pull Request builder plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin). – osowskit Aug 05 '16 at 21:19
I've found the solution, and explained it here:
Jenkins Perforce Plugin - multiple changelists in a single poll
Thanks for the ideas!

- 1
- 1

- 305
- 3
- 7
- 19