Hold all jobs

All questions about Control-M jobs definitions
Post Reply
User avatar
bullu
Nouveau
Nouveau
Posts: 14
Joined: 08 Jul 2009 12:00

Hold all jobs

Post by bullu » 08 Jul 2009 4:57

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

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 08 Jul 2009 6:58

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,

User avatar
bullu
Nouveau
Nouveau
Posts: 14
Joined: 08 Jul 2009 12:00

Post by bullu » 09 Jul 2009 7:34

Hi Rahul,

Thanks for the information, But I need to put all the jobs on hold for a particular day. Is that possible?

Thanks,
Karthik

User avatar
mulvida
Nouveau
Nouveau
Posts: 12
Joined: 09 Aug 2007 12:00

Post by mulvida » 09 Jul 2009 5:10

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.

User avatar
rahulsehgal
Nouveau
Nouveau
Posts: 148
Joined: 19 Mar 2009 12:00
Location: Delhi
Contact:

Post by rahulsehgal » 09 Jul 2009 5:14

Hi Karthik,

You can put Odate From in yymmdd format under CTRL + F option, in both the blanks ------ to ------- Odat should be same

regards,

User avatar
bullu
Nouveau
Nouveau
Posts: 14
Joined: 08 Jul 2009 12:00

Post by bullu » 09 Jul 2009 8:08

Thanks a lot rahul. I will try that tomorrow & let you know if it worked or not.

Regards,
Karthik

Admin007

Post by Admin007 » 09 Jul 2009 9:57

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

User avatar
ejtoedtli
Nouveau
Nouveau
Posts: 51
Joined: 19 Nov 2008 12:00
Location: Portland, Or. - U.S.A.

Post by ejtoedtli » 11 Jul 2009 12:27

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.

sunform2

Post by sunform2 » 17 Jul 2009 2:06

Use ctmpsm utility -> List All and choose the 'GH' function (Global hold).

Simple and faster !!!

User avatar
philmalmaison
Nouveau
Nouveau
Posts: 1148
Joined: 08 Jun 2007 12:00
Location: Ile de France

Post by philmalmaison » 20 Jul 2009 1:50

or submit the ~/ctm_server/scripts/hold_all_jobs for each datacenter

regards
philmalmaison

User avatar
wstraube
Nouveau
Nouveau
Posts: 7
Joined: 20 Oct 2008 12:00
Location: Shrewsbury, Massachusetts
Contact:

Putting All Jobs on Hold

Post by wstraube » 18 Aug 2009 9:45

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.

User avatar
PGUNX
Nouveau
Nouveau
Posts: 3
Joined: 14 Jan 2010 12:00

Post by PGUNX » 14 Jan 2010 5:20

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|

Post Reply