Just a word of caution. During testing I experienced a server outage that lasted about 20 minutes. When I could finally get back into my server my HTTPD processes were running at 500MB each! While I could PING my server, the websites were down and I could not access SSH. At the time of this outage, I was testing the code here.
I waited a while and then reloaded onto my primary message boards last night. This morning my servers experienced a 3 hour outage (all because I took a nap 10 minutes before it started!). This was a hard crash.
There are no server logs to tell me what might have happened. Oddly enough, the site with the generator on it has no long entries at all for today while my other sites logs are fine.
I suggest that if you have a HEAVY server load you be cautious as this script caused the only outage my server has had (and mine is a loaded Dell with SCSI RAIDs, 1.5GB of ECC memory and the works).