in reply to Using flag files to monitor cluster jobs
Stick the names you are looking for in an array and splice them out as they are found. When the array is empty, all your jobs are done.
Update: See benizi's post below for an important correction to this untested logic.
my @dirs = qw[ ... ]; my @rFiles = map{ "$_/analysis_completed" } @dirs; while( @rFiles and sleep 15 ) { -e $rFiles[ $_ ] and splice @rFiles, $_ for 0 .. $#rFiles; } print "All done";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using flag files to monitor cluster jobs
by benizi (Hermit) on Oct 31, 2005 at 17:03 UTC | |
by BrowserUk (Patriarch) on Oct 31, 2005 at 17:59 UTC |