Run a Jenkins job every one minute using H/1 * * * *
Asked Answered
C

4

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

Central answered 30/4, 2015 at 18:59 Comment(3)
Was it necessary to post pictures of text?Skeptical
@IanW AI ML ... can help SO website one day!Central
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?. Or if you have time to throw together, the AI ML thing, fell free to contribute...Skeptical
S
105

Try * * * * * to run every minute.

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

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

Sense answered 30/4, 2015 at 19:50 Comment(5)
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.Central
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).Central
I see what you are trying to do. There seems to be an open defect - issues.jenkins-ci.org/browse/JENKINS-22129Sense
Stiil have to use * * * * *Smokejumper
would this work? H(0-59)/1 * * * *Malaya
C
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".

Cloth answered 18/5, 2017 at 20:39 Comment(0)
A
0

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

Ameliaamelie answered 16/6, 2021 at 5:22 Comment(2)
Hey pravi, this was mentioned in another answer many years ago. Try to avoid adding repeat answers.Underhill
No, this is supposed to work but it doesn't.Toft
V
-1

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

Varicocele answered 19/8, 2020 at 17:57 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.