Shell (csh) Programming problem

Stefan Brandle stefan at wheaton.UUCP
Thu May 31 00:22:00 AEST 1990


In article <1990May29.132532.15379 at isavax.isa.com> cliffb at isavax.isa.com (cliff bedore*) writes:
>I'm having a problem with a csh program that I wrote to log out idle users.
>... All of these problems show up when
>run from cron.  When run as root (or su) it runs fine.  When I kill cron and
>invoke cron as root, it works fine but when it is invoked from cron that

How do you call it from cron?  I have this idea that cron runs `sh' by default,
so you might need to do something like 

10 * * * * /bin/csh your_program

Otherwise cron might be trying to run it from the Bourne shell.  (Since the
Bourne shell doesn't look at the `#!/bin/csh', that doesn't help you).

So maybe you are running it differently from cron on the two different machines?
Hope this helps...

-Stefan
-- 
---------------------------------------------- MA Bell: (708) 260-4110 ---------
Stefan Brandle                  UUCP: ...!{obdient,uunet!tellab5}!wheaton!stefan
Wheaton College			or	stefan at wheaton.UUCP
Wheaton, IL 60187 		"But I never claimed to be sane!"



More information about the Comp.unix.ultrix mailing list