*BSD News Article 10875


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA845 ; Mon, 08 Feb 93 11:02:43 EST
Newsgroups: comp.unix.bsd
Path: sserve!manuel.anu.edu.au!munnari.oz.au!sgiblab!pacbell.com!UB.com!quack!dfox
From: dfox@quack.sac.ca.us (David Fox)
Subject: cron problems in 386BSD?
Message-ID: <fYWoXGm@quack.sac.ca.us>
Keywords: cron daily output script
Organization: The Duck Pond public unix: +1 408 249 9630, log in as 'guest'.
Date: 5 Feb 1993 16:54:32 UTC
Lines: 48


Hi *,

I've a nagging problem/question that has bothered me for sometime yet I
haven't yet pinned down the problem until now.

In the binary distribution, there is a crontab file in /etc as well as
an /etc/daily, /etc/weekly, /etc/monthly for daily, weekly, and monthly
output of common administrative tasks that should be done.

I took this as an inspiration, sort of, to make my own cron file in 
/var/cron/tabs/root, using the supplied crontab plus some extras.

However, the daily output setup doesn't work.  It works all right from
the command line, but I've not been able to get it to work from the
crontab.

In the affected file, there are lines like:

0 2 * * *  root   /bin/sh  /etc/daily 2>&1 | tee /var/log/daily.out |
mail -s "daily output root"

and similar lines for the weekly and monthly administrative reports.

When this is run from cron, the daily output file is 0 bytes, and mail
says something like 'no subject, no body, hope that's ok'.

If it works on the command line, but doesn't work in cron, what could be
the problem?


------------------------------------------------------------------------
in real life: david fox            email: dfox@quack.sac.ca.us
5479 Castle Manor Drive,                  
San Jose, CA 95129                 "Thanks for letting me change some
USA                                 magnetic patterns on your HD" -me
408-253-7992                        
"You've just won an absolutely FREE trip to the Isles of Langerhans" -me
------------------------------------------------------------------------
-- 
------------------------------------------------------------------------
in real life: david fox            email: dfox@quack.sac.ca.us
5479 Castle Manor Drive,                  
San Jose, CA 95129                 "Thanks for letting me change some
USA                                 magnetic patterns on your HD" -me
408-253-7992                        
"You've just won an absolutely FREE trip to the Isles of Langerhans" -me
------------------------------------------------------------------------