on 11-11-2015 11:04 PM
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.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
User | Count |
---|---|
84 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.