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