From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <97897434207981.tru64-unix-managers.marc@archive.invalid> From: Dermot Paikkos Date: Mon, 08 Jan 2001 17:18:10 +0000 To: tru64-unix-managers Subject: executing programs from cron X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=97897434207981 0100,0100,0100Hi Managers, Alpha 3000/400 OS 4.0D I resisted the urge to post this message because I thought there would be an obvious answer but I can't find one. We run a small database on our system and have programs which 0100,0100,0100sits over the top. A program has been written which I need to run once a week. The program is fully automatic and requires no user input. The program closes the database ( to release any records which it thinks are still being edited), and then generates a list of reports...etc) I called the program from a script so I could get a log of the programs activity. The program and the script will run from the command line0100,0100,0100. I ran the script from "at" and that worked fine. But I can not get the program to run from cron and I hate to admit it but it no longer runs from at. Here's the script. PATH=/sbin:/usr/sbin:/usr/bin:/usr/desk DESK=/usr/desk/ SPL=/usr/spl/ ROOTLOG=/usr/root/logs/ export PATH DESK SPL ROOTLOG cd /usr/spl echo "Date is:\c" date echo "Date is:\c" > ${ROOTLOG}webupdate.log date >> ${ROOTLOG}webupdate.log echo "Starting webupdate script..." echo "Starting webupdate script..." >> ${ROOTLOG}webupdate.log 2>&1 /usr/desk/dtproc_a /usr/spl/au19e.dto # This is the line which I need. sleep 80 echo "Restarting meta4 database..." echo "Restarting meta4 database..." >> ${ROOTLOG}webupdate.log 2>&1 /usr/root/bin/m4_19 start # This just re-starts the database # just incase the program fails to. echo "Webupdate script has been run." echo "Webupdate script has been run." >> ${ROOTLOG}webupdate.log 2>&1 echo "Time is now:\c" date +%H:%M:%S echo "Time is now:\c" >> ${ROOTLOG}webupdate.log date +%H:%M:%S >> ${ROOTLOG}webupdate.log I have tried to add the above line directly into cron but this didn't work. I tried "exec /usr/desk/dtproc_a /usr/spl/au19e.dto" this didn't work. Now the script runs and I get output from cron, but the whole script is completed in 30 seconds. There also seems to be output missing from the cron mail. Below is the mail I receive. Where is the "Date is " or the "time is now" statement? Log file /usr/root/logs/startMetaFour.log Sun Jan 7 04:00:00 GMT 2001 Starting MetaFour 7F00,0000,0000> dtdbms DESK > dtdbms SPL > mftcps DESK > mftcps SPL /usr/root/bin/m4_19: 16703 Killed 7F00,0000,0000> Killing LS9 > Starting LS9 MetaFour Started. Sun Jan 7 04:00:20 GMT 2001 0100,0100,0100I spoke to the developers and they say they have no problems running such programs from cron and suggest it is a problem with my installation. Does any one have any ideas? Is there anything else I can try? Thanx Dp. ~~ Dermot Paikkos * dermot@sciencephoto.com Network Administrator @ Science Photo Library Phone: 0207 432 1100 * Fax: 0207 286 8668