cyclic job waiting for a file

All questions about Control-M jobs definitions
Post Reply
User avatar
jedoch
Nouveau
Nouveau
Posts: 2
Joined: 17 Feb 2014 12:00

cyclic job waiting for a file

Post by jedoch » 17 Feb 2014 10:05

Hi,

I have a unix shell that test the existence of a file.
I need to configure a cyclic job that runs from 05:00 to 09:00 every 20 minutes and calls this shell until the file exists (stop cyclic), and if at the end of the time range the file doesnt exists, i need to set the job to NOTOK (red).

how do i do this?

thanks for your help.

Jorge

User avatar
jCarlos
Nouveau
Nouveau
Posts: 36
Joined: 19 Jun 2013 12:00

Post by jCarlos » 18 Feb 2014 1:20

can't you do that by script? just using sleep? or is it that you wish to enforce the use of ctm in this?

User avatar
jedoch
Nouveau
Nouveau
Posts: 2
Joined: 17 Feb 2014 12:00

Post by jedoch » 18 Feb 2014 1:24

Doing it in the script is my second option. The thing is that I'm going to use the same script from diferent ctrl m jobs for diferent files because the hour range is going to change for each file:

file 1 -> 03:00 to 05:00 (2 hours waiting)
file 2 -> 08:00 to 12:00 (4 hours waiting)

User avatar
Nightwatchrenband
Nouveau
Nouveau
Posts: 28
Joined: 24 Jul 2012 12:00
Location: Long Beach, CA

cyclic job waiting for a file

Post by Nightwatchrenband » 21 Feb 2014 6:37

IF you are on v7, do two jobs. First a filewatcher. cyclic job, and set the from time in execution tab. Set absolute stop time in FW parms. In your STEP tab set OK if file not found. SETCOND to release the next job which is the script. Set NOTOK if reach absolute stop time and Do SETCOND to "N" so script will not run.
If you can write good Unix script that might be easier and take one less job.

Post Reply