Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 Aug 2006 15:25:09 +0100
From:      Alex Zbyslaw <xfb52@dial.pipex.com>
To:        Lisa Casey <lisa@jellico.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: e-mail from cron
Message-ID:  <44EC6545.1010109@dial.pipex.com>
In-Reply-To: <012e01c6c6bd$29966ac0$d51a2cd0@lisac>
References:  <012e01c6c6bd$29966ac0$d51a2cd0@lisac>

next in thread | previous in thread | raw e-mail | index | archive | help
Lisa Casey wrote:

>
> # Perform daily/weekly/monthly maintenance.
> 1       3       *       *       *       root    periodic daily  2>&1 | 
> sendmail service@jellico.com
> 15      4       *       *       6       root    periodic weekly 2>&1 | 
> sendmail service@jellico.com
> 30      5       1       *       *       root    periodic monthly 2>&1 
> | sendmail service@jellico.com
> #
>
If these were standard cronjobs sending output to stdout then this would 
work (though I would use e.g. "mail -s 'my subject'" not sendmail - 
latter only really useful when you want to generate the headers 
yourself).  However, IIRC, periodic jobs are handled differently.  
Extract from man periodic.conf:

dir_output
     (path or list) What to do with the output of the scripts executed
     from the directory dir.  If this variable is set to an absolute
     path name, output is logged to that file, otherwise it is taken
     as one or more space separated email addresses and mailed to
     those users.  If this variable is not set or is empty, output is
     sent to standard output.

e.g.
daily_output=service@jellico.com

same for weekly, monthly.

Or unset all of them and use the crontab email method you used above.

--Alex





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44EC6545.1010109>