Is there a way to "delay" work through the REST API

The instant messaging plugin is able to receive an IM message like “build XYZ in 10 seconds” and set up work in 10 seconds. He does this through the Java API to schedule the job [0].

I would like to know if there is any magic parameter that I can pass to the REST API [1], which will allow me to “delay” the work in the same way?

thanks.

[0] - https://github.com/jenkinsci/instant-messaging-plugin/blob/master/src/main/java/hudson/plugins/im/bot/BuildCommand.java#L54

[1] - https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

+4
source share
1 answer

GET the following URL:

http://jenkins/job/jobname/build?delay=4000sec 

In this example, the task will run after 4000 seconds.

Screenshot of build queue

This works with the buildWithParameters URL for parameterized jobs.

+9
source

Source: https://habr.com/ru/post/1480995/


All Articles