Re: [Taskforest-discuss] Requests--Dependency on files
Brought to you by:
enoor
From: Aijaz A. <en...@us...> - 2009-09-20 03:42:41
|
Hello. Yes, waiting for a file to arrive is a very common pre-requisite for a job. In my experience I have found that it is best to have a separate script check for the file, and not have the job scheduler like taskforest wait for the file. There are many things to consider, like: a) Is the file on a remotely mounted network drive that may not be visible by taskforest b) Will the file name change every day? c) What if the file name is dependent on an external counter, so we don't know if the file has arrived until we do something like check the file extension, or even check the contents of the file. d) Does the user account that runs taskforest have read permission on the file (or execute permission on the directory) I have seen all these situations in the recent past, and I am sure there are more things to consider. It is probably simplest to write a simple perl script that looks like this pseudocode: my $file = "filename.txt" while (current_time < "2300") { if (file exists) { exit 0; } sleep for 1 minute; } exit 1; Then you could make this small script into its own job, and make that job a dependency for your real job. I think this is the safest and most reliable way to do file dependencies. Would something like this work for you? Putting this functionality in taskforest in a way that will work across all environments could make taskforest too complicated. Aijaz On Sat, Sep 19, 2009 at 9:05 PM, 数字熊 <yan...@gm...> wrote: > Hello Aijaz, > > We are currently using Taskforest . in some situation。 File arriving is a > event to run a job. > > this Feature is very important for me. > > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry® Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9-12, 2009. Register now! > http://p.sf.net/sfu/devconf > _______________________________________________ > Taskforest-discuss mailing list > Tas...@li... > https://lists.sourceforge.net/lists/listinfo/taskforest-discuss > > |