Tips Windows

Da GazziWiki.
Jump to navigation Jump to search

Riavvio controllato di servizio es. Tomcat:

@echo off
net stop Tomcat8 >> d:\log.txt
timeout 10
:loop
sc query Tomcat8 | find "STOPPED"  >> d:\log.txt
if errorlevel 1 (
  timeout 5
  goto loop
)
net start Tomcat8  >> d:\log.txt