64

How can I run a job created in Jenkins every one minute ? Am I missing anything?

PS: I'm trying not to use: */1 * * * *

enter image description here enter image description here

AKS
  • 16,482
  • 43
  • 166
  • 258
  • Was it necessary to post pictures of text? – Ian W Aug 20 '20 at 01:46
  • @IanW AI ML ... can help SO website one day! – AKS Aug 24 '20 at 18:57
  • And when the day comes that "AI ML ... can help SO website", it won't be users helping users, so we won't worry about people deciphering pictures of text. In the meantime, you can help your fellow helpers today; [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/). Or if you have time to throw together, the AI ML thing, fell free to contribute... – Ian W Aug 24 '20 at 19:16

4 Answers4

103

Try * * * * * to run every minute.

Unfortunately H/1 * * * * does not work due to open defect.

Defect: https://issues.jenkins-ci.org/browse/JENKINS-22129

vins
  • 15,030
  • 3
  • 36
  • 47
  • 1
    The idea is to use H (so that Jenkins can to balance) if there are hundreds of jobs who have the same build period. */1 * * * * will do the same. – AKS May 01 '15 at 15:49
  • 10
    The question is more towards using H instead of * i.e. why H/1 * * * * is picking/scheduling the job for 1 hour difference (instead of 1 minute difference) while H/2 * * * * schedules the job for 2 minutes (as expected). – AKS May 06 '15 at 16:39
  • 4
    I see what you are trying to do. There seems to be an open defect - https://issues.jenkins-ci.org/browse/JENKINS-22129 – vins May 06 '15 at 17:07
  • Stiil have to use * * * * * – Asiri Dissanayaka Jun 06 '20 at 14:15
  • would this work? H(0-59)/1 * * * * – boki Aug 08 '23 at 01:26
16

Your intuition is right, H/1 is supposed to behave like "run every minute".

However, there is a well-known bug in Jenkins. See JENKINS-22129.

Currently, H/1 behaves like "run every hour".

thiagowfx
  • 4,832
  • 6
  • 37
  • 51
0

Use this format it will Run a Jenkins job every one minute "* * * * *"

pravi
  • 1
-1

To run the build process every minute, check the Build periodically option and add * * * * *

Gunjan Paul
  • 511
  • 6
  • 12