Auto restart IIS when service unavailable

A bit crude but it works.  Make a schedule task for this batch file:

del testsql1.asp
C:\wget\wget.exe –timeout=30 –tries=1 http://www.website.com/testsql1.asp
find /C “SQLServer Test Code 1″ testscript.asp
IF ERRORLEVEL 1 IISRESET /RESTART /TIMEOUT:120 /REBOOTONERROR

You can leave a response, or trackback from your own site.

Leave a Reply