ctmfw timeout value

All questions about Control-M jobs definitions
Post Reply
User avatar
ttb_uk
Nouveau
Nouveau
Posts: 3
Joined: 12 Dec 2007 12:00

ctmfw timeout value

Post by ttb_uk » 12 Dec 2007 11:02

Hi all.

I have a cyclic f/w job but it must end at 18:00 each day. How can this be done when I have large 'timeout' values to avoid Ops getting inundated with alert? ie I want it to start at 06:00 each day and run it for 12hours. If a file is detected, it runs the next job and the f/w will start all over again but again with a 12 hour timeout, so how do i make the 2nd or 3rd run end bang on 1800?

one way I was thinking of was to obtain the current time (say 12:31) and then convert it to a new timeout value by multiplying the 12 by 60 and then adding the 31 (751) and then subtract it from the timeout value of 1800 (1080) which would equal 729 which equates to 6 hours and 29 mins. However, is it possible to multiply within the SET panel or anywhere else within COntrol-M so I can do all these calculations as I cannot seem to find anything on how to do this.

Thanks in advance :¬)

User avatar
fyot
Nouveau
Nouveau
Posts: 736
Joined: 26 Apr 2005 12:00
Location: PARIS
Contact:

Post by fyot » 13 Dec 2007 10:14

Hi

If you want to kill at 18:00 your job, you can use in PostProc definition, the Latetime parameter to shout the ORDERID to a script to kill your job.

You must follow information exiting in that topic.

User avatar
typhaont
Nouveau
Nouveau
Posts: 7
Joined: 18 Jun 2007 12:00

Post by typhaont » 01 Jul 2008 5:46

Hi,



When you configure your job, then timeout parm can contend the date :

Exemple :

%%TIMEOUT=HHMM
or
%%TIMEOUT=YYYYMMDDMM

For my situation, i use this formul for calculate next batch date :


%%$CALCDATE %%$DATE +1


I hope, that this reply is good for you

User avatar
mauriziog
Nouveau
Nouveau
Posts: 807
Joined: 08 Jun 2007 12:00
Location: Varese - Italy
Contact:

Post by mauriziog » 01 Jul 2008 6:19

Interesting question.
A)
In the ctmfw utility you can set the:
----------
absolute stop time:
Indicates an absolute time at which the file is no longer watched. For example,200502061400, would mean that at 2 PM on February 6th, 2005 the FileWatcher utility will stop watching the file.
Alternatively, you can use the HHMM format, in which case the current date is used.
------------

That in your case is fixed at 1800.
So set this option and when you find the file rerun the job setting maxrerun=3.

B)
Another way is to calculate the elapsed time (the maximum time that the utility runs) with a variable, based on the current time.
So the first run elapsed=18:00-0600 --> 12 hours
the file arrived for example at 08:00 so the second run:
elapsed= 18:00-0800 --> 10 hours
if the second file arrived at 14:00 for example for the run 3:
elapsed=18:00-14:00 --> 4 hours

User avatar
ttb_uk
Nouveau
Nouveau
Posts: 3
Joined: 12 Dec 2007 12:00

Post by ttb_uk » 08 Jan 2010 2:10

I have got this working by calculating the difference between the current time and the end time and setting this as the timeout value, but going forward, if I can just enter 1 value which is the timeout time that would be great but I cant get this to work. FYI I am running this on a Sun Solaris box. Here is my command:

ctmfw %%filename CREATE 0 60 10 3 %%TIMEOUT

%%TIMEOUT=201001081307

what am I doing wrong? :roll:

User avatar
nicolas_mulot
Nouveau
Nouveau
Posts: 149
Joined: 07 Jan 2010 12:00

Post by nicolas_mulot » 08 Jan 2010 3:36

ttb_uk,

I think you misplaced the absolute stop time, which should be the 10th positional parm. Actually, you did not specify the 8th (monitor file size when wildcard is used) and the 9th (starting time for detecting files).

You should try this syntax:
ctmfw %%filename CREATE 0 60 10 3 0 N NOW 201001081830
.. and receive the following message:

0108 18:30:02 : Processing of File Watcher commands timed out ( absolute stop time )

Pls check the manual for the value of the 9th parm according to your requirements.
And then adapt this syntax to your requirements (%%TIMEOUT)
Cheers
Nicolas Mulot

Post Reply