-
1. Re: Restart jboss from the cron
adrian.brock Feb 6, 2002 7:41 AM (in response to iaguirre)What error message do you see?
Does cron have your jre in its path?
Regards,
Adrian -
2. Re: Restart jboss from the cron
iaguirre Feb 7, 2002 5:24 AM (in response to iaguirre)Simply it is not executed. No errors displaye.
This is the script. If iexecute it in the command line, no problen, but if I introduce it in the cron of the same user it is not executed
#!/bin/sh
#Mover el fichero de log
DATE=`/usr/bin/date +%d%m%y-%H:%M`
RAIZ=/internet/JBoss/JBoss-2.4.3/log/arranque
/usr/bin/cp $RAIZ.log $RAIZ.$DATE
# Minimal jar file to get JBoss started.
#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:/internet/JBoss/JBoss-2.4.3/bin/run.jar
JBOSS_CLASSPATH=/internet/JBoss/JBoss-2.4.3/bin/run.jar
# Add all login modules for JAAS-based security
# and all libraries that are used by them here
#JBOSS_CLASSPATH=$JBOSS_CLASSPATH
# Check for SUN(tm) JVM w/ HotSpot support
#
HOTSPOT=`java -version 2>&1 | grep HotSpot`"x"
if [ "$HOTSPOT" != "x" ]; then
HOTSPOT="-server"
else
HOTSPOT=""
fi
# Add the XML parser jars and set the JAXP factory names
# Crimson parser JAXP setup(default)
#JBOSS_CLASSPATH=$JBOSS_CLASSPATH:../lib/crimson.jar
JBOSS_CLASSPATH=$JBOSS_CLASSPATH:/internet/JBoss/JBoss-2.4.3/lib/crimson.jar
JAXP=-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.crimson.jaxp.Document
BuilderFactoryImpl
JAXP="$JAXP -Djavax.xml.parsers.SAXParserFactory=org.apache.crimson.jaxp.SAXPars
erFactoryImpl"
cmd="/usr/j2re1_3_1_02/bin/java $HOTSPOT -Xrs $JAXP -classpath $JBOSS_CLASSPATH
org.jboss.Main $@"
${cmd} > /internet/JBoss/JBoss-2.4.3/log/arranque.log 2>&1 &
echo $! > /internet/JBoss/JBoss-2.4.3/log/jboss.pid
sleep 10
exit 1 -
3. Re: Restart jboss from the cron
adrian.brock Feb 7, 2002 5:58 AM (in response to iaguirre)I can't see anything obvious.
It doesn't work isn't very much information :-(
Does the jboss.pid file get created?
Have you tried adding debug statements, e.g.
echo GOTHERE >> ~/jbosscron.debug
Regards,
Adran -
4. Re: Restart jboss from the cron
iaguirre Feb 7, 2002 6:47 AM (in response to iaguirre)I think that the script is not executed.
There are no messages -
5. Re: Restart jboss from the cron
adrian.brock Feb 7, 2002 7:22 AM (in response to iaguirre)You don't say which flavour of Un*x you are running.
Here's a couple of links for cron configuration,
(found using www.google.com with search "cron user")
http://www.uwsg.iu.edu/usail/automation/cron.html
http://www.redhat.com/support/resources/tips/cron/cron.html
Regards,
Adrian