tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andre Legendre <hale_in...@yahoo.com>
Subject Re: java environment + cron issue
Date Wed, 01 Sep 2004 08:24:58 GMT
I don't know the cause of your problem, but personaly I use nohup to 
start commands from cron :
nohup /usr/local/jakarta-tomcat-5.0.18/bin/shutdown.sh

nohup manage in good way standard input and output (you can pass 
options) and keep your task running after father task die.

Hope it help.

Andre

John Sidney-Woollett wrote:

> On a unix RH8 box starting and stopping TC 5.0.18 under the root account
> using the following script:
>
> #!/bin/sh
> # This script stops tomcat for (about) 1 minute, and then restarts it
> # it is run at the same time as the script to backup the
> # database (which is shutdown, and a file level copy made)
> echo "Stopping Tomcat at `date`"
> /usr/local/jakarta-tomcat-5.0.18/bin/shutdown.sh
> echo "Tomcat shutdown at `date`"
> sleep 15
> echo "Starting Tomcat at `date`"
> /usr/local/jakarta-tomcat-5.0.18/bin/startup.sh
>
> stops and starts TC as expected, and after TC is restarted all my JSP's
> correctly render UTF-8 strings.
>
> However if the script is invoked from cron, the JSPs render all
> non-standard ASCII characters (like accented ones) as a ? (question
> mark), until TC is restarted again by executing the above script under
> the root account.
>
> Does anyone know what the cause of the problem is, and how to fix it?
>
> (We will be upgrading to TC 5.0.28 shortly, but I don't think the TC
> version is the issue). There must be some kind of enviroment issue going
> on that I don't understand.
>
> Thanks
>
> John Sidney-Woollett
>
> ps here is the cron entry (created using crontab -e from the root 
> account).
>
> # crontab -l
> # DO NOT EDIT THIS FILE - edit the master and reinstall.
> # (/tmp/crontab.11679 installed on Fri Aug 20 07:12:03 2004)
> # (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
> 45 3 * * * /bin/nice /usr/bin/rsync-backup-client / root@hrde1a:/
> # Pause tomcat for database backup, make sure this job is run
> # at the same time as the db backup job on ddgfe1a
> 5 5 * * * /usr/local/bin/pauseTC.sh
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message