Here is what I have so far. I just need this to check if the service is running, and if so, leave it be, but if it's not, to start it up. I'd like this check to happen every 5 minutes or so.
Thanks in advance.
:start
echo %date% %time% >> servicecheck.log
net start | find "doorsnxtsvr" >> servicecheck.log 2>>&1
if not .%errorlevel%.==.0. goto trouble
sleep 300
goto start
:trouble
net start "doorsnxtsvr"
Thanks in advance.
:start
echo %date% %time% >> servicecheck.log
net start | find "doorsnxtsvr" >> servicecheck.log 2>>&1
if not .%errorlevel%.==.0. goto trouble
sleep 300
goto start
:trouble
net start "doorsnxtsvr"