[JIRA] (JENKINS-61066) Schedule Jenkins job using Jenkins Rest API

18 views
Skip to first unread message

prasanna.rengarajan.external@telefonica.com (JIRA)

unread,
Feb 12, 2020, 6:20:05 AM2/12/20
to jenkinsc...@googlegroups.com
Prasanna Rengarajan created an issue
 
Jenkins / Improvement JENKINS-61066
Schedule Jenkins job using Jenkins Rest API
Issue Type: Improvement Improvement
Assignee: Martin Spielmann
Components: _unsorted, schedule-build-plugin
Created: 2020-02-12 11:19
Labels: jenkins plugin
Priority: Minor Minor
Reporter: Prasanna Rengarajan

I have a Jenkins job which is scheduled for a specific time. I want to modify that timing programmatically.
I tried to modify the build by installing Schedule Build plugin and modify it using http://jenkins_url/job/jobname/build?delay=3344sec. But this will put the job in quiet period which holds the java thread. I'm looking to modify the Schedule entry without putting it to quiet period.

Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

jenkins@gavinmogan.com (JIRA)

unread,
Feb 15, 2020, 1:17:04 PM2/15/20
to jenkinsc...@googlegroups.com
Gavin Mogan updated an issue
Change By: Gavin Mogan
Component/s: _unsorted

jenkins@gavinmogan.com (JIRA)

unread,
Feb 15, 2020, 1:17:04 PM2/15/20
to jenkinsc...@googlegroups.com
Gavin Mogan commented on Improvement JENKINS-61066
 
Re: Schedule Jenkins job using Jenkins Rest API

Can you update this ticket with a use case. "Because I want it" is a bad reason to add new features.

 

Can you use the cron trigger?

https://jenkins.io/doc/book/pipeline/syntax/#triggers

 

When you say "holds the java thread" what do you mean? that it takes up an executor/node on the sidebar?

jenkins@gavinmogan.com (JIRA)

unread,
Feb 15, 2020, 1:17:06 PM2/15/20
to jenkinsc...@googlegroups.com
Gavin Mogan updated an issue
Change By: Gavin Mogan
Issue Type: Improvement New Feature

ian.williams1@telus.com (JIRA)

unread,
Feb 15, 2020, 8:43:03 PM2/15/20
to jenkinsc...@googlegroups.com
Ian Williams commented on New Feature JENKINS-61066
 
Re: Schedule Jenkins job using Jenkins Rest API

(not the OP, but my interpretation; may be misinterpreting something)
Build periodically/Schedule Job (ie: cron) works fine as an ongoing solution, if you wan to repeatedly run the job on a schedule. At the other end of the spectrum you have "Build Now". We have a number of scenarios where we want to build not now, but later today.

It's essentially the difference between using UNIX cron and at, or running a command immediately.

It is not convenient to change the configuration of the job so it can run later, then undo the change once run. Also, unless you have Job Configure, that option is not available to you. It should be available to users who have only Job | Build.

prasanna.rengarajan.external@telefonica.com (JIRA)

unread,
Feb 17, 2020, 4:05:03 AM2/17/20
to jenkinsc...@googlegroups.com

Hi Gavin Mogan,

From External Application, we want to update the cron entry or override the schedule timing of a jenkins job. We are trying to create a jenkins job (called Job A) which will update or override the schedule timing of another Jenkins Job(called Job B)

ian.williams1@telus.com (JIRA)

unread,
Feb 18, 2020, 4:11:03 AM2/18/20
to jenkinsc...@googlegroups.com

One other scenario .. we have scheduled job that runs but depends on an independent system's maintenance activities to have completed. On the rare occasion that does not complete in time, would be nice to.have a post-build action to retry after an interval. Right now, we must manually trigger when discovered.

ian.williams1@telus.com (JIRA)

unread,
Feb 19, 2020, 4:27:03 PM2/19/20
to jenkinsc...@googlegroups.com

I was just investigating a separate issue regarding plugins and came across: [naginator pluginhttps://plugins.jenkins.io/naginator].

This plugin allows you to automatically reschedule a build after a build failure.

This can be useful in several cases, including:
The build is dependent upon external resources, that were temporarily unavailable (DB down, network down, website down, etc).

I wonder if that is the same expected behaviour? I will be investigating if it suits my needs.

ian.williams1@telus.com (JIRA)

unread,
Feb 19, 2020, 4:29:02 PM2/19/20
to jenkinsc...@googlegroups.com
Ian Williams edited a comment on New Feature JENKINS-61066
I was just investigating a separate issue regarding plugins and came across: [naginator pluginhttps plugin|https ://plugins.jenkins.io/naginator].
{quote}

This plugin allows you to automatically reschedule a build after a build failure.

This can be useful in several cases, including:
The build is dependent upon external resources, that were temporarily unavailable (DB down, network down, website down, etc).{quote}


I wonder if that is the same expected behaviour? I will be investigating if it suits my needs.
Reply all
Reply to author
Forward
0 new messages