cancel
Showing results for 
Search instead for 
Did you mean: 

Is it possible to autoamte the cancellation of scheduled jobs

Former Member
0 Kudos

I have a scenario in which I need to cancel the 5 instances of a scheduled job chain. So  I need to automate this .For eg after completion of job A Job B should run and cancel five scheduled instances of job D. How can I automate this.

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183789
Active Participant
0 Kudos

Hi Manisha,

Could you please be more specific on the requirement? My understanding is, you need to automate a job which should cancel five schedule instances of job.

Please clarify on the below:

Instances are nothing but the same job replicas at different timings. So you want five instances of a job or five different job instances?

I am not sure of reason for cancelling the schedule instances through automation (by another job). Because this can be directly achieved by just cancelling the schedule or restricting the schedule to required timings using time windows..

However, if it is the requirement you are looking, I believed this can be done through Event configuration on the both jobs which to be triggered to cancel other jobs. Having said, along with event configuration you need to make the expression of the jobs that to be cancelled as "false".

So, whenever the source job ex.., Job A triggers and completes it will raise a event which will trigger the instances (associated with wait events) will ended up in "Skipped/Disabled" (but not cancelled) status.

HTH,

-Niranjan

former_member183789
Active Participant
0 Kudos

Adding to above: to use false expression it should be defined under a job chain.

Former Member
0 Kudos

I don't think we can cancel already scheduled job through event. As per my requirements it's something like timing is not fixed .I will elaborate it. Job B is scheduled to run every 15 minutes so it's like step6 of job A  and job B cannot run simultaneously else it will fail. So currently they are manually cancelling the job chain B before starting job chain A. But now they want to automate and step 6 of job A takes almost two ours so we need to cancel  all 8 instances of Job B and once Step6 of job A gets completed .Job B should again start running every 15 minutes.

nanda_kumar21
Active Contributor
0 Kudos

Did you try using the locks to avoid the simultaneous execution of jobs?

thanks

Nanda

former_member183789
Active Participant
0 Kudos

Yes, as said by Nand, this requirement can be achieved by using locks. Though using locks cannot cancel the jobs, stops parallel execution.