[ic] expireall and server --start fail to run in crontab (was: Where is checkstat.sh?)

Dan B db@cyclonehq.dnsalias.net
Mon, 12 Mar 2001 20:23:49 -0800

Good troubleshooting, Curt.  Answer below...

At 09:10 PM 3/12/2001 -0600, you wrote:
>Thank you Dan. I believe this is what I need, however, I can't seem to 
>execute anything from my crontab for some reason. This may be a crontab 
>thing. I have tried:
>5,10,15,20,45,55 * * * * /home/myfiles/interchange/bin/interchange --start
>5,10,15,20,45,55 * * * * /home/myfiles/interchange/bin/interchange --serve
>These both work when executed from /interchange as
>bin/interchange --start
>but not from cron. Any pointers out there? This crontab worked fine for 
>MV4.04 but not the IC4.6.3 tarball on Linux Mandrake 6.0. What could I 
>have screwed up? Nothing appears in error logs in either /interchange or 
>/catalogs/cat. It's like the crontab is not doing anything, although I 
>know it is because it fails this also:
>44 4 * * * /home/tgis/interchange/bin/expireall
>(or expireall -r)
>and reports to me via email as:
> >From root  Mon Mar 12 04:44:01 2001
>Return-Path: <root>
>Received: (from root@localhost)
>         by myhost.com (8.9.3/8.8.7) id EAA16611
>         for mylogin; Mon, 12 Mar 2001 04:44:01 -0600
>Date: Mon, 12 Mar 2001 04:44:01 -0600
>Message-Id: <200103121044.EAA16611@myhost.com>
>From: root@myhost.com (Cron Daemon)
>To: mylogin@myhost.com
>Subject: Cron <mylogin@myhost> /home/myfiles/interchange/bin/expireall
>X-Cron-Env: <SHELL=/bin/sh>
>X-Cron-Env: <HOME=/home/myfiles>
>X-Cron-Env: <PATH=/usr/bin:/bin>
>X-Cron-Env: <LOGNAME=mylogin>
>Status: RO
>Couldn't read interchange.cfg: No such file or directory
>The file is definately there. I have checked spelling of everything. Can 
>anybody point me in the right direction or offer tips to troubleshoot this?

Tell your crontab to execute the command as your interchange user (which 
gives the process the effective user id: EUID same as UID interchange) with 
the following command:
su interch -c "/home/myfiles/interchange/bin/interchange --start"

(of course, replace interch with your interchange username).

And enjoy,

Dan Browning, Cyclone Computer Systems, danb@cyclonecomputers.com