Help answer threads with 0 replies.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 11-17-2003, 01:58 AM   #1
LQ Newbie
Registered: Oct 2003
Posts: 4

Rep: Reputation: 0
Unhappy crontab job to restart tomcat...

Hi all,

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/ as below:

DATE=`date "+%Y-%m-%d"`
cd /usr/local/tomcat/logs
mv catalina.out catalina.$DATE.out

If I run 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?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
skip the crontab job for one time ust Linux - General 2 04-20-2005 04:01 AM
crontab job entry notolerance Linux - Software 2 02-20-2005 03:40 PM
Can I get a konsole to start from a crontab job? davee Linux - Newbie 2 03-05-2004 06:22 AM
adding a job to crontab via shell script tazio Linux - General 7 10-23-2003 03:44 PM
Setting global variables from a crontab job davee Programming 2 10-06-2003 08:05 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 03:32 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration