0

I have a job and it can run concurrently. The trick part here is that this job needs to have an interval to one another, at least for 30 seconds. So when Build1 runs, Build2 should wait for 30 seconds to start.

I already tried using the quiet period but it does not fit my needs (it only works when a job is not triggered by Build Now or Build With Parameters)

Is there a way for me to be able to do this kind of condition?

1 Answers1

0

You can try enumerating other builds of this job and sleeping until all the other builds have been running above 30 seconds. See example code in this answer.

MaratC
  • 6,418
  • 2
  • 20
  • 27
  • Hi @MaratC, thanks for your help and I appreciate it. However, I found what I am looking for. I used the Throttle builds option where it _Enforces a minimum time between builds based on the desired maximum rate_. It's weird but it gets the job done. – computerandcoffee Nov 09 '20 at 01:25