30      5       1       *       *       root    periodic monthly 2>&1
| sendmail [EMAIL PROTECTED]
but all I get is a blank email sent to [EMAIL PROTECTED]
[...]
also.. using 2>&1 doesn't seem appropriate, afaik you would use that in
crontab if you don't want to get emails via cron

You would use "2>&1" in conjunction with ">/dev/null" if you didn't want to get emails from cron, sure. But if you don't redirect stderr, then stderr doesn't end up in the mail.

That is, if "periodic monthly" outputs stdout and stderr, and you only redirect (with "|") stdout, then you don't get the stderr. "2>&1" says, "send output from file-descriptor 2 (stderr) to file- descriptor 1 (stdout)". That way the redirection with the pipe contains both stdout and stderr.

As far as redirecting the periodic output to a different user, set "daily_output" in /etc/periodic.conf. See /etc/defaults/periodic.conf for an example. You'd of course have to do the same for weekly and monthly.
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to