1.创建bat文件
vaccinateOff.bat =>
taskkill /T /F /FI "WINDOWTITLE eq Tomcat-jx-1"
注:Tomcat-jx-1 为tomcat名,
vaccinateOn.bat =>
@echo off cd /d "D:appServerjiangxiapache-tomcat-8.0.47-jx-1in" title Tomcat重新启动脚本 call "startup.bat" exit
2.配置定时任务
关闭任务先执行,启动任务后启动