Stop job ciclyc in executing

All questions about Control-M jobs definitions
Post Reply
User avatar
futre25
Nouveau
Nouveau
Posts: 166
Joined: 11 Aug 2009 12:00

Stop job ciclyc in executing

Post by futre25 » 27 May 2011 12:33

Hi to all.

I have a problem and not how to solve it.
I have a cyclic job that lasts about 30 minutes. Make an FTP to an external server, and sometimes stands in the ftp, and the job does not end in CONTROL-M.
I have an alert that tells me if the job is running over 45 min. So I see that has been caught.
But when it is not working time is a problem because no one detects that it has been caught and is a critical job.
As I can stop the execution of the job and then re-executed without the intervention of a person.
There any way to Control-M make a kill when the exectime exceeds 45 min.

There are nights that gets caught all night long.
Thank you very much to all.

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

Post by philmalmaison » 30 May 2011 2:54

Hi,
Here is the process,
make a scripts like :
#!/bin/ksh
orderid=$2
ctmkilljob -ORDERID ${orderid}
ctmshout -DEST ECS -MESSAGE "ORDERID:${orderid} KILL by ctm prog CTMKJ due to exectime parameter" -SEVERITY V
exit

make a job and papameter it with on exectime > x
do shout to <program> (that i show setp after)
use %%ORDERID in shout text message

logon to control-m server
use ctm_menu/Parameter Customization/System Parameters and Shout Destination Tables/Shout Destination Tables
and create a program shout destination in SYSTEM table, give it a logical name that you should use in postprog section.

Regards,
Philmalmaison

Post Reply