Scheduled restart of Tomcat 6 in Windows

Source: Internet
Author: User

In Windows, Tomcat6 restarts the service regularly. First, create the tomcat6 service: service install tomcat6 (1) create a restart script for the service, tomcat_restart.bat @ echo restart tomcat6 service, log to C: \ tomcat_restart.log @ echo 1. stop tomcat6 service @ echo 2. sleep 10 seconds @ echo 3. start tomcat6 service echo --------------------------------------------------------> C: \ tomcat_restart.log echo [% date % time %] Prepare to restart tomcat> C: \ tomcat_restart.log echo [% date % time %] stop the service> C: \ tomcat_restart.log net stop tomcat6> C: \ tomcat_restart.log @ echo wait 10 seconds ping-n 10 127.0.0.1 echo [% date % time %] restart> C: \ tomcat_restart.log net start tomcat6> C: \ tomcat_restart.log echo >>c: \ tomcat_restart.log echo (2) Add to System Task Scheduler control panel-task scheduler-add Task Scheduler, select tomcat_restart.bat

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.