How to schedule jobs to run one after another one, in sequence, one at the time?

juan_villalta
Kilo Contributor

I'm working with the "Service Portfolio Management", specifically with the Availability process. This one has a scheduled job - Calculate Availability - which runs every day at 2am, server time. Now, I need to run a process that will update additional availability records, right "after: the Calculate Availability job has finished. What I would like to have is just another scheduled job that waits for the first one to run. Any suggestion here? I've been browsing features of Aspen, the release we have installed, and can't find anything that helps me to set jobs in sequence, with dependency (not timely set). Thanks for your suggestions folks.

9 REPLIES 9

geoffcox
Giga Guru

Move your scheduled job scripts to script includes.
Then have one scheduled job that calls one script and then the other.


Thanks Geoffcox, that's exactly what I did as per my last comment, and it worked as expected.


CapaJC
ServiceNow Employee
ServiceNow Employee

Glad to hear it. Thanks for the follow-up!


Antony_Alldis
ServiceNow Employee
ServiceNow Employee

Hi Juan,



Another way to achieve this is to actually run a Scheduled Workflow.



* Create a workflow, that uses Run Script activities, that run in sequence


* Schedule the workflow to run at whatever frequency you require: Workflow > Scheduled Workflows



You can reference existing Script Includes from the Run Script activity.



Regards,


Tony