on 10-29-2014 5:56 AM
Hi,
Please help me in understanding of how LOCKS work in CPS ?
How can we configure lock between 2 jobs as they should not run simultaneously. Basically making these 2 different jobs with different schedule dependent on each other, unless first job completes another one shouldn't start running and vise versa.
Regards,
Shwetha Houde
To answer you question:
It is not recommended to use locks, because when there are more jobs waiting for the locks, as soon as the lock is free, one of the jobs will grab the lock and reschedule all the jobs again and this can performance issues as well.
If the two job are different jobs
If its the same job - meaning that a job running every 5 minutes, takes 8 minutes to complete and you don't want the next occurrence of the job until the first one completed, then set the pre-submit count to 1, while submitting the job (in Time and Date screen)
Thanks
Nanda
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Nanda for your quick reply, but in my scenario I would go for LOCK option , as I have only 2 different jobs for which I need to lock . One job which run at 12:00 am and another at 12:00pm . Unless the 12:00 am Job completes , 12:00 pm Job shouldn't start and vice versa .
Please confirm is it ok to use LOCK in this case and also below steps are correct one for using LOCK
1) Definition - Locks - Create Lock
2) Go to Job ( which runs at 12:00 am ) Edit - Lock tab - Mention this LOCK created.
3) Then to go to Job ( which run ay 12:00 pm ) Edit - Lock tab - Mention the same LOCK created.
Regards,
Shwetha Houde
Hello,
Yes that is correct. Go ahead and use that.
Now i do not fully agree with the statement from Nanda that usage of Locks is not recommended. I want to nuance this a bit. If you want to force for a target application that no more than 1 job can be started at the same time: use a queue with limit 1. For the usage that Shwetha describes, this is where Locks are designed for.
Regards Gerben
Thanks a lot Gerben and Nanda for help , It really worked for me.
Regards,
Shwetha Houde
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.