in reply to RE: Re: Alarm Implemented in Win32?
in thread Alarm Implemented in Win32?
That's good to know. I never really went back to optimize the code, I was happy enough that I could run it on my NT machine at work. We had a server that kept crashing at different times, usually when nobody was looking :-) I threw this together to ping it every 5 minutes and it sort grew into a tool that did a few different checks. I put all the code into functions that handle creating the objects, connecting, checking the results, cleaning up and then returning a pass or fail. Each connection type has it's own special quirks hidden behind the function, so I can just as easily drop in a test_ping($hostname) as I could test_http($hostname)
For a script that sits idle and wakes up every 5 minutes it's an acceptable slowdown ;-)
Oh, and it ended up being a bad ups on the server...
|
|---|