Annet
Annet

Reputation: 673

Jenkins: build one job after another with some delay

I have 2 jobs in Jenkins: QA and Dev. In Dev job I checked "Build after other projects are built" option and set project name = QA so that QA job will be built after Dev job is built. But in my particular situation I need that QA job started building in 5 mins after Dev job is built. How can I do it? maybe I can add some build step with some data to add this delay ?

TIA, Anna

Upvotes: 31

Views: 55431

Answers (4)

Reddysekhar Gaduputi
Reddysekhar Gaduputi

Reputation: 490

To make it simpler with out worrying about trigger from URL using delay, there is a Jenkins plugin which helps to schedule the job on the fly with as much as delay you need (configurable when ever you are running build and supports parameterized builds as well). For more details please check Plugin Pags, GitHub

Upvotes: 0

Karol Majewski
Karol Majewski

Reputation: 253

I know the topic is quite old but in case sameone else is looking for an answer here it is. When using parametrized build remember to escape "&". You can replace it with: "%26" or put the whole URL in quotes. It will work. Please also remember to use delay as first parameter.

Upvotes: 2

akahunahi
akahunahi

Reputation: 1822

If you're using the REST api, you can add a url get value like this:

http://jenkins/job/jobname/build?delay=4

That will delay 4 seconds and start the job.

Upvotes: 5

rajasaur
rajasaur

Reputation: 5470

There is a "Quiet Period" option in the Advanced Project Options available. You can enter a value of 300 (its in seconds) to delay the start of the job by 5 mins.

Upvotes: 52

Related Questions