Remember the birth of a script

Source: Internet
Author: User

Previously instructed to do a small app, placed on a Linux machine, the app server is tomcat.

However, due to the congenital problems of Tomcat, the app will not be accessible for approximately six hours and can only be restarted under Tomcat again.

Transferred to another machine was liberty, the situation slightly better, can top 12 hours, after the restart, and sometimes even restart the machine, and later was disgusted to change the password results will not go in.

Decorate other services software is subject to, no way back to the old road, thought every six hours to let Tomcat himself restart not good, so wrote a script:

Two Perl scripts to start/Restart the Linux tomcat

Then use crontab to get the script to execute automatically at the 0,6,12,18 point.

Scheduled Tasks under Linux crontab

This scheduled task is executed according to the plan, no more reports that the app can't log in, no more human ops.

Remember the birth of a script

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.