[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re[6]: Problems getting crontab to execute my script



Saturday, June 15, 2002, 5:24:15 PM, Patrick wrote:

PW> On Sat, 15 Jun 2002, Søren Neigaard wrote:

>> It is executable by all now, and it still does not work :( Here is my
>> script, it calls other scripts, but that's ok right?
>> 
>> ./killproximus.sh
>> mv /var/log/proximus_log /var/log/proximus_log.old
>> ./proximus.sh > /var/log/proximus_log 2>&1 &

PW> Try the full path to those scripts instead of ./, which cron prbably
PW> doesn't get.  Oh, and /bin/mv too.

Oh yes not so hardcoded after all :)

Now it can kill my Java process, but it will not start it again. Here
are my scripts if it helps:

restart_proximus.sh:

/projects/messageconverter/bin/killproximus.sh
mv /var/log/proximus_log /var/log/proximus_log.old
/projects/messageconverter/bin/proximus.sh > /var/log/proximus_log 2>&1 &


killproximus.sh:

#!/bin/sh
PID=`ps auxw |grep "proximus"|awk '{ print $2}'`
kill -9 $PID


proximus.sh:

/usr/java/jdk1.3/bin/java -classpath /projects/messageconverter/classes:/projects/messageconverter/lib/enhydra.jar:/projects/message
converter/lib/client.jar dk.mobilethink.messageconverter.Converter /projects/messageconverter/property.xml migway_dk_3232 proximus_be


They now all has full paths to everything, as I see it (except mv, but
that part works).

PW> Patrick

/Søren


-- 
To UNSUBSCRIBE, email to debian-user-request@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: