crontab job to restart tomcat...
My platform: redhat8, tomcat4.1.24
I have a weekly restart tomcat job defined by "crontab -e" below:
# run at 2 am on Saturday: restart tomcat & rename log file
0 2 * * 6 /usr/local/tomcat/bin/housekeep.sh
housekeep.sh as below:
mv catalina.out catalina.$DATE.out
If I run housekeep.sh directly, it return what I want: catalina.out renamed and a new catalina.out created.
But when it is triggered by cron job, catalina.out renamed without catalina.out created, and all message still write to the renamed catalina.out file (i.e. catalina.2003-11-17.out)
anything wrong with me?