How do you set on Demand scheduled jobs to run after the first one completes

brown9394
Tera Expert

Hello Experts, 

I have 19 different on demand scheduled jobs I need to run. Is there a way to set it up so after the first one completes, the 2nd one kicks off, and then the 3rd one and so on? Just so you don't have to manually wait until one completes and then go execute the next one. 

Thanks! 

3 REPLIES 3

Tim Owen
Mega Expert

It sounds as though you want to set the first one to on demand, then run the other 19 sequentially after the first one. If this is the case, I would:

1. Set the first one's "RUN" field to "On Demand".

2. Set the second one  to RUN = "After Parent Runs". Enter the first one in the Parent field.

3. On each one after, set  RUN = "After Parent Runs". Set the Parent field to the job that should run just before it.

 

As long as you set the correct parent for each, they should run in order after manually starting the first.

Hi Tim,

I don't see that option on Run field. Do I have to go into another module for this? Currently I'm looking in where you code the scheduled job and set as 'on demand'. 

I used the module System Definition > Scheduled Jobs. It seems that if you have one already created of a certain type such as On Demand, you may not have the option to change RUN to After Parent Runs or vice versa. 

It may also be related to the Type of job (Scheduled Script Execution, Scheduled import, etc...). 

You could try creating a new scheduled job, and set to after parent runs initially?

 

EDIT: I am running Jakarta instance by the way. I do not think that matters though.