Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
1) run a job
2) if the job completes properly, it will do a "touch file.name"
3) if the "file.name" exists, execute the next job
I think NFS is killing me, though--the file may get created, but the perl program is executed so quickly that it doesn't see the "file.name" in time and exits.
Here is what's not working:-
The dependency file *did* get created, but it took a few miliseconds to show up. How can I prevent abnormal termination? I don't think "sleep" is working the way I expect.for ($c = 1; $c < 17; $c++) { if (fork() == 0) { exec ("CAD program with $c options...details not impor +tant"); exit; } wait; system ("sleep 20"); #so NFS gets updated...? if (-e "cmdos/$n[$c].done") { $complete = 1; #in other words: do nothing } else { die ("Dependency file $n[$c].done did not get created- +-exiting!\n"); } }
Thank You,
-Fiddler42
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Running multiple jobs with dependencies
by waswas-fng (Curate) on Apr 24, 2004 at 14:14 UTC | |
|
Re: Running multiple jobs with dependencies
by Fletch (Bishop) on Apr 24, 2004 at 14:27 UTC | |
|
Re: Running multiple jobs with dependencies
by Happy-the-monk (Canon) on Apr 24, 2004 at 13:51 UTC | |
|
Re: Running multiple jobs with dependencies
by dave_the_m (Monsignor) on Apr 25, 2004 at 16:26 UTC | |
|
Re: Running multiple jobs with dependencies
by Ryszard (Priest) on Apr 25, 2004 at 13:48 UTC | |
|
Re: Running multiple jobs with dependencies
by rupesh (Hermit) on Apr 26, 2004 at 12:02 UTC | |
by idsfa (Vicar) on Apr 26, 2004 at 17:49 UTC |