- To: Howard Lowndes <lannet@xxxxxxxxxxxxx>
- Subject: Re: [SLUG] cron troubles
- From: Peter Chubb <peter@xxxxxxxxxxxxxxxxxx>
- Date: Wed Dec 11 19:39:03 2002
- Cc: Peter Chubb <peter@xxxxxxxxxxxxxxxxxx>, Mail List - SLUG <slug@xxxxxxxxxxx>
- Comments: Hyperbole mail buttons accepted, v04.18.
>>>>> "Howard" == Howard Lowndes <lannet@xxxxxxxxxxxxx> writes:
Howard> On Wed, 11 Dec 2002, Peter Chubb wrote:
>> >>>>> "Howard" == Howard Lowndes <lannet@xxxxxxxxxxxxx> writes:
>>
Howard> I have one box that has a problem running cron jobs. The jobs
Howard> start OK, but never complete. If I run the job from the
Howard> command line then the job runs OK, so it's not a problem with
Howard> the command script, but with crond.
>> The only time I've had that problem was when the job was assuming
>> that stdin was a tty. Cron (I think) closes stdin.
>>
>> Does the job run if you redirect its stdin to /dev/null ?? Does it
>> hang on the command line if you close stdin? ( sh job <&- )
Howard> It looks like you have something there Peter. At the command
Howard> line:
Howard> job <-runs OK sh job <-runs OK job <&- <-hangs sh job <&-
Howard> <-hangs
OK add an explicit redirection of stdin to /dev/null in the crontab
--- that'll probably fix it.
job < /dev/null
PeterC