For development purposes, I'm running an Apache server on my windows machine. Its very non-critical, but sometimes I'll be running processes that take a long time and Apache will stop server requests. Restarting the Apache service works just fine when this happens.
Is there a script out there somewhere that can detect if Apache is failing to load pages and then restart the service if it is?
It would probably look something like this:
LOAD localhost/index.php
IF LOAD FAILED:
RESTART APACHE SERVICE
You can do it externally with WGet.exe and the scheduler service:
Not sure which OS you're using, so YMMV with this task scheduler config:
Assume your batch script is called c:\bin\files\ca.cmd, type this at the command line: