• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Script to monitor windows service?

FreshPrince

Diamond Member
does anyone know of any free or commercial solution that'll monitor windows server service and restart it if it stops?

Thanks,

-FP
 
just create a batch file to do it and schedule it to run at whatever interval you want to check.

for example - this would check for a service called Symantec AntiVirus Client to be running (findstr is case sensitive) and would restart it if if is not running.


net start | findstr /C:"Symantec AntiVirus Client"
if %errorlevel% == 1 goto restart

:end
exit

:restart
net start "Symantec AntiVirus Client"




-Dave
 
Why not just set this particular service to restart if it's stopped? Go to properties on the service you want to monitor and choose the recovery tab. Set it to restart the service on failure.
 
Back
Top