Change scheduled job time or run it now

36 views
Skip to first unread message

Roger McCarrick

unread,
Feb 8, 2024, 10:03:32 PMFeb 8
to rundeck-discuss
Is there a way to change the time of a scheduled job?
Or is there a way to run that scheduled job now, other than killing it first?

thanks

Roger

rac...@rundeck.com

unread,
Feb 9, 2024, 7:38:06 AMFeb 9
to rundeck-discuss
Hello, Roger.

If you're talking about the "Run Job Later" execution, the only method to change the date is to "kill" the Job on the Activity page and reschedule.

To execute currently, the job must be configured with the "Multiple Executions" flag. Edit the job, navigate to the "Other" tab, choose "Yes" for "Multiple Executions?" and save the job. You can now launch it even if the job is pending execution on "Run Job Later".

Greetings.

Roger McCarrick

unread,
Feb 9, 2024, 10:10:55 AMFeb 9
to rundeck-discuss
Thanks .. I didn't explain correctly. 
I have jobs that schedule other jobs. For example, jobA schedules jobB, via the API, to run in 3 hours for now.
jobA calculates data and passes that data to jobB as parameters. 
But then the user comes to me and says, jobA is finished and I don't wanna wait 3 hours for jobB to run. I want it to run now.
And I mean that instance of the jobB, not a different instance of jobB.

when you click into the scheduled jobB from Activity, it says

 Scheduled for Thu 4:00 pm (in 3 hours)
2024-02-08T00:00:00Z

the only thing available is "Kill Job"

rac...@rundeck.com

unread,
Feb 9, 2024, 12:01:11 PMFeb 9
to rundeck-discuss

I see, same logic using the API then.

You can integrate a script on the JobA that matches that condition (JobA is ready), detect the JobB execution ID (using the ?status=scheduled flag), abort that execution, and then, run the JobB immediately.

Alternatively, you can abort the execution and re-schedule to run immediately. But all ways require to kill the JobB "pending" execution.

Greetings.

Roger McCarrick

unread,
Feb 9, 2024, 12:06:54 PMFeb 9
to rundeck-discuss
Thanks, I guess I can ask for a feature request, to run a job that's already scheduled, at a different time or now (without killing and resubmitting).

rac...@rundeck.com

unread,
Feb 9, 2024, 12:22:07 PMFeb 9
to rundeck-discuss
Sounds good :-)
Reply all
Reply to author
Forward
0 new messages