|Keep It Simple, Stupid|
Re: Re: Re: Infinte perl scriptby mr_leisure (Beadle)
|on Jan 05, 2001 at 13:43 UTC||Need Help??|
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.
this is still not finished