Page 1 of 1

Rerun job that has ended with run time less than 10 minute

Posted: 25 Jan 2012 1:45
by andyshack
I need to rerun a job that has ended successfully but has run too quickly. I have been unable to find any parameter to use in the Steps panel that will indicate that the EXECTIME is too small.

I am using Control-M 6.3

Posted: 26 Jan 2012 12:08
by nicolas_mulot
Andyshack,

What you need is to shout to program.
Using ctm_menu  Parameter Customization Menu  Shout destination tables, you have to update your shout destination table (default SYSTEM an create a new entry, type P (program) the physical name of which being the full path of the script.
Lets call this logical sertination “RERUN_IF_TOO_SHORT” and the physical name c:\batchshout\rerun_if_too_short.bat).

The rerun_if_too_short.bat should contain at least the following

set ORDERID=%~2
ctmpsm –updateajf %ORDERID% rerun

Posted: 26 Jan 2012 12:20
by nicolas_mulot
Andyshack,

it will be a good idea as well to pass the %%RUNCOUNT autoedit variable in your message text. Doing so, you will be able to control potentially infinite rerun loops and leuch the ctmpsm only if the amount of rerun already done has not reached an specified limitation.
you will then have to parse the message text received by your script, for the 2nd received parameter will nowcontain 2 words (the orderid and the runcount). This will make your script a bit more complex.
cheers
Nicolas Mulot

Posted: 26 Jan 2012 1:33
by andyshack
Thank you for the response - I was coming to the idea that the Shout Destination table would be my only option.