That's a good idea. However I want it to run constantly, like a service. So
in some respects it would have to be a loop. Maybe embedded loops. I don't
really know :)

-----Original Message-----
From: Andrew Gaffney [mailto:[EMAIL PROTECTED]
Sent: Friday, December 17, 2004 3:29 PM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: Is there a time module to help with this...


[EMAIL PROTECTED] wrote:
> Hi all. I would like to write a simple monitoring tool that basically
> performs an action on a list of servers (ping, port check, etc) at a
> specified time interval. So let's say I want to ping each server every 5
> minutes. I don't want to code a loop where I ping all the servers and then
> sleep for 5 minutes, and then start over again. Reason this wouldn't work
is
> because as the list of servers grows and while some pings may time out,
the
> actual time to go through the loop once would never be the same. 
>  
> So i'm hoping there is some sort of time module that will perform a list
of
> tasks at a timed interval. While one server may be timing out, it's still
> making sure that the others are being checked within the 5 minute time
> frame.
>  
> If there is no module to help me with this, can anyone offer any other
help,
> perhaps if you have done something like this in the past?

You could setup cron to run the script once every 5 minutes. Some like the 
following in your crontab should work:

*/5 * * * *     root    /my/script/to/ping/hosts.pl

-- 
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to