Page 1 of 1

pooling file

Posted: Mon Mar 06, 2006 5:43 am
by santosh
We want to run a job whenever we get a .done file in UNIX folder. I was able to look file using "Wait for file Activity" in sequence.

But I want this job to get triggered automatically multiple times in a day. I mean i will get 6 or 7 .done files in a day. My job should run accordingly. Please share your thoughts on this.

regards,
Santosh

Posted: Mon Mar 06, 2006 10:29 am
by kumar_s
WaitforFile may not help you much.
But use Execute command activity to find for this file.
Since you need to find anywhere in the unix folder,use

Code: Select all

find / -name .done 2>/dev/null
and use the Comand output in the Trigger to check for the output and trigger the rest of the stage. You can itrate this command continuesly with some SLEEP value.

Posted: Tue Mar 07, 2006 12:08 am
by rasi
Santosh

You can also use the Sequencer and Loop for your job. Inside your loop have the Wait for File and while running your job clear the file so that when next file comes it will be ready for next run.

Posted: Tue Mar 07, 2006 7:52 am
by ray.wurlod
That would create an "always running" job sequence. Don't forget to design in a clean way to notify it to shut down. There are many possibilities.

Posted: Tue Mar 07, 2006 10:34 am
by jatayl
I would just use unix cron command and set it up to execute a korn shell script that looks for the file.

Jason