Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Re: Re: Infinte perl scriptby mr_leisure (Beadle) |
on Jan 05, 2001 at 13:43 UTC ( [id://50024]=note: print w/replies, xml ) | Need Help?? |
Howdy - This is my first attempt at an answer to a question so go easy on me if i screw it up folks :P I have a chunk of code that runs a df command on a specified directory, and will loop every x seconds as you choose. You can find it here for your reference ( the part you need is in the second script , ds.pl). For quickness, the code i use to loop it is - What this basically does is uses the GetOpt::Long module to accept and process command-line parameters entered by the user, and then uses the untilstatement to run the loop according to the parameters entered. So what you could do in theory is put a line in your cron to start it (rjoseph.pl -dir =/usr/bin/perl -time=120) which would then run the script every two minutes on the /usr/bin/perl directory. As I said, this is my first *serious* answer, so if I have rambled, I apologise, but I sincerely hope this helps, if only on the sleep thing. I hope you like Getopt though, cause it's been totally handy for me. Cheers, jim this is still not finished
In Section
Seekers of Perl Wisdom
|
|