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