Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The directory scan needs to run like so:
I can do every small piece of this, except the major one which is to create a script that never exits, even if it sleep()s for hours at a time.
Using pseudocode, I've considered the following:
Anyway, anyone have suggestion?while ( currenttime is between 11PM and 6AM ) { scan directory every hour send found files to other process } # this will bail out if the time range is no good, # rather than sleeping, so that's no good while (1) { same process } # just seems stupid although that could just be me # wanting to overcomplicate things
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sleep() but don't exit
by Corion (Patriarch) on Aug 12, 2005 at 17:09 UTC | |
by etm117 (Pilgrim) on Aug 12, 2005 at 17:16 UTC | |
|
Re: sleep() but don't exit
by davidrw (Prior) on Aug 12, 2005 at 17:29 UTC | |
|
Re: sleep() but don't exit
by Transient (Hermit) on Aug 12, 2005 at 17:06 UTC | |
|
Re: sleep() but don't exit
by sh1tn (Priest) on Aug 12, 2005 at 19:14 UTC |