Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!att!mcdchg!tellab5!wheaton!stefan From: stefan@wheaton.UUCP (Stefan Brandle ) Newsgroups: comp.unix.ultrix Subject: Re: Shell (csh) Programming problem Message-ID: <2070@wheaton.UUCP> Date: 30 May 90 14:22:00 GMT References: <1990May29.132532.15379@isavax.isa.com> Reply-To: stefan@wheaton.UUCP (Stefan Brandle ) Organization: Wheaton College, IL Lines: 23 In article <1990May29.132532.15379@isavax.isa.com> cliffb@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@wheaton.UUCP Wheaton, IL 60187 "But I never claimed to be sane!"