1. Setting Environment variables
The Catalina_home value is the root directory of Tomcat,
Of course different tomcat can set multiple environment variables, such as catalina_home_v1,catalina_home_v2,catalina_home_v3 and so on .... But you need to change the corresponding catalina_home inside the Startup.bat to the value you set.
2. Modify Tomcat's process name
Because it involves the possibility of multiple tomcat booting at the same time, the process name is Java.exe, so it is necessary to set different tomcat different process names in order to differentiate.
In the setclasspath.bat file,
Change into
Copy "%java_home%\bin\java.exe" "%java_home%\bin\java_my.exe" set _runjava= "%java_home%\bin\java_my"
is to copy a java.exe out, Java_my is the new process name
3. Write the self-starter script file Start.bat
taskkill/f/t/im java_my.exeping 127.0.0.1-n 2d:\apache-tomcat-7.0.57-x64\bin\startup.batexit
4. In the system task plan, set the auto-run time to Start.bat.
Run the Start.bat script regularly, the system will kill the java_my process, and then restart.
Windows under multiple Tomcat settings timed restart