Hi people, i need some information. I need to kill a job every day at 08:00 AM, but yhe problem is i don't know when it start's. If the job was executin fixed for example at 04:00 AM, i could use the ctmkill job option after 4 hours, but the problem s that i never know when it start's, only when it must end.
Any solution or workaround?
Thanks
osafr71
Kill Job after at 08:00 every day
1. Set up a 'shout' destination that maps to a 'p' (for program) on the Control-M Server.
2. On Unix your shout destination script would be something like this -
#! /bin/csh
ctmkilljob -ORDERID $2 &
ctmshout -ORDERID $2 -USER ECS -MESSAGE "Long running job killed" -SEVERITY R &
The first line does the cancel, the second line will send an alert to the ECS console.
3. On the Post Processing panel put this destination in the 'to' field and (importantly) have the message field as just %%ORDERID - then fill in the 'when' and 'param' fields as desired (e.g. Late Time = 0800 means the job will issue the cancel at 8:00 AM).
2. On Unix your shout destination script would be something like this -
#! /bin/csh
ctmkilljob -ORDERID $2 &
ctmshout -ORDERID $2 -USER ECS -MESSAGE "Long running job killed" -SEVERITY R &
The first line does the cancel, the second line will send an alert to the ECS console.
3. On the Post Processing panel put this destination in the 'to' field and (importantly) have the message field as just %%ORDERID - then fill in the 'when' and 'param' fields as desired (e.g. Late Time = 0800 means the job will issue the cancel at 8:00 AM).
On windows:
1. Set up a 'Shout Destination' with 'Logical Name' as "KILLJOB", "S" for 'Adress', "Program" for 'Destination', and "D:\Production\KillJob.bat" for value.
2. KillJob.bat script is below.
cmd /C ctmkilljob -orderid %2
3. On the Post Processing panel put KILLJOB in the 'To' field, put %%ORDERID in the 'Message' field, select "Late Time" in the 'When' field and put 0800 in the 'Param' field.
1. Set up a 'Shout Destination' with 'Logical Name' as "KILLJOB", "S" for 'Adress', "Program" for 'Destination', and "D:\Production\KillJob.bat" for value.
2. KillJob.bat script is below.
cmd /C ctmkilljob -orderid %2
3. On the Post Processing panel put KILLJOB in the 'To' field, put %%ORDERID in the 'Message' field, select "Late Time" in the 'When' field and put 0800 in the 'Param' field.