Hold all jobs
Hold all jobs
Hi,
Is there a way in control m to put all jobs on hold by a single action? I know it can be done by Right click->hold. Its time consuming for clicking each job and putting it on hold. So waiting for an easier way. Please advice.
Regards,
Karthik
Is there a way in control m to put all jobs on hold by a single action? I know it can be done by Right click->hold. Its time consuming for clicking each job and putting it on hold. So waiting for an easier way. Please advice.
Regards,
Karthik
- rahulsehgal
- Nouveau
- Posts: 148
- Joined: 19 Mar 2009 12:00
- Location: Delhi
- Contact:
Hi Karthik,
Do you want to hold all the jobs with status as Ended not Ok, Ended ok, Waiting State? If yes then please follow below step.
Press CTRL + F in Control-M EM, Enter * in Job Name, Press Enter, Right click on any selected job and click on hold, this way you can hold all the jobs in Control-M.
Or you can use job Status option to specify the status of the job you want to hold, thanks.
regards,
Do you want to hold all the jobs with status as Ended not Ok, Ended ok, Waiting State? If yes then please follow below step.
Press CTRL + F in Control-M EM, Enter * in Job Name, Press Enter, Right click on any selected job and click on hold, this way you can hold all the jobs in Control-M.
Or you can use job Status option to specify the status of the job you want to hold, thanks.
regards,
I set up a way to put all jobs on hold, by ensuring that all jobs have a quantative resource called Job or Schedule in them, each using 1.
The QR is used by the entire schedule, so I set it to around 1000.
When I want to stop the world, I set it to zero, and anything that wants to run turns blue until I am ready to let things go.
I only use this when there is an emergency.
In the past I have also had a QR for each agent name or job grouping that allows me to stop an entire application if required.
But this has to be built in from initial design to be practical.
The QR is used by the entire schedule, so I set it to around 1000.
When I want to stop the world, I set it to zero, and anything that wants to run turns blue until I am ready to let things go.
I only use this when there is an emergency.
In the past I have also had a QR for each agent name or job grouping that allows me to stop an entire application if required.
But this has to be built in from initial design to be practical.
- rahulsehgal
- Nouveau
- Posts: 148
- Joined: 19 Mar 2009 12:00
- Location: Delhi
- Contact:
The easiest way to put all jobs on hold is to display All Active Jobs in the EM, hit CTRL+F for the Find function and without filling in any fields, click Find/Select. That will highlight all the jobs on your screen and then either right click on any one of the jobs and click HOLD or simply click the 'Lock' icon at the top of your screen. You can FREE all jobs the same way. You can also specify specific jobs to hold or free by using your Dynamic Filter and specify jobs, or nodes, etc
We use a very different approach. There are times when we want to hold all of our "applications" jobs. However we want to let jobs that are actively running to complete rather than holding executing jobs. We have a STAT condition defined in every job for this purpose. We delete the condition when we want to hold the jobs. No jobs start executing. Jobs that are currently executing complete. We usually delete this condition about one hour prior to when the jobs need to be held. Most of our jobs only run for a few minutes. (They are cyclic and run many times a day). We use this process every other weekend when some scheduled maintenance occurs. It works great for us. STAT is used because the jobs often need to be held spaning New Day.
You can expand this concept for holding groups of jobs. We actually have up to three levels of these conditions in some jobs. I won't go into the details of explaining all of them. F.Y.I. - we have about 4000 jobs loaded into Control-M each day. And with the cyclic executions we have around 70,000 job executions per day. Our environment is too big to try to do any of this manually. We have it all automated. We scheduled dummy jobs to add and/or delete the conditions when needed.
This technique also works great whgen you want to hold almost, but not all, of your jobs. This happens to be our case. There are usually a few jobs we leave running when everything is stopped.
You can expand this concept for holding groups of jobs. We actually have up to three levels of these conditions in some jobs. I won't go into the details of explaining all of them. F.Y.I. - we have about 4000 jobs loaded into Control-M each day. And with the cyclic executions we have around 70,000 job executions per day. Our environment is too big to try to do any of this manually. We have it all automated. We scheduled dummy jobs to add and/or delete the conditions when needed.
This technique also works great whgen you want to hold almost, but not all, of your jobs. This happens to be our case. There are usually a few jobs we leave running when everything is stopped.
- philmalmaison
- Nouveau
- Posts: 1148
- Joined: 08 Jun 2007 12:00
- Location: Ile de France
Putting All Jobs on Hold
I created a job called ctmsuspend which has an owner of ctm621 (control-M server administrator) and executes a command
ctmsuspend -s
This will allow any executing jobs to complete but no further processing will be done by control-M
The only way to resume batch is to manually log into the unix system as ctm621 and type in
ctmsuspend -r
to resume batch.
ctmsuspend -s
This will allow any executing jobs to complete but no further processing will be done by control-M
The only way to resume batch is to manually log into the unix system as ctm621 and type in
ctmsuspend -r
to resume batch.
login to controlm server, then type
ctmpsm -listafjtab <tablename> |grep -i job
OUTPUT
0002g5yj SECUJ016 JOB 20100114 Wait Tim 0300
0002g60t SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yu SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yt SECUJ016 JOB 20100114 Wait Tim 0300
0002g5ys SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yr SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yq SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yp SECUJ016 JOB 20100114 Wait Tim 0300
ctmpsm -updatetable <tablename> HOLD |FREE|DELETE|UNDELETE|RERUN|
ctmpsm -listafjtab <tablename> |grep -i job
OUTPUT
0002g5yj SECUJ016 JOB 20100114 Wait Tim 0300
0002g60t SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yu SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yt SECUJ016 JOB 20100114 Wait Tim 0300
0002g5ys SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yr SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yq SECUJ016 JOB 20100114 Wait Tim 0300
0002g5yp SECUJ016 JOB 20100114 Wait Tim 0300
ctmpsm -updatetable <tablename> HOLD |FREE|DELETE|UNDELETE|RERUN|