Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 03 Sep 2011 15:42:20 -0600
From:      Brett Glass <brett@lariat.net>
To:        Robert Bonomi <bonomi@mail.r-bonomi.com>, questions@freebsd.org
Subject:   Re: "at" command and mail
Message-ID:  <201109032142.PAA27491@lariat.net>
In-Reply-To: <201109032035.p83KZfse010717@mail.r-bonomi.com>
References:  <201109031639.KAA25689@lariat.net> <201109032035.p83KZfse010717@mail.r-bonomi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
At 02:35 PM 9/3/2011, Robert Bonomi wrote:
 
>Is 'atrun' actually sending the mails or is 'cron' doing it?  'atrun' is
>invoked by 'cron', from a specification in the system crontab file.

/usr/src/libexec/atrun/atrun.c shows an invocation of sendmail(8) directly
from atrun(8).

>Cron emails *whenever* a cron-scheduled job produces stdout or stderr
>output.

atrun intentionally doesn't produce output unless it encounters an error;
see the same source file.

>You could, in theory, have the crontab line _append_ output to a filename
>based on a timestamp, however, that intermixes output from all users.

One way to avoid problems would be to create a file name from a timestamp
and a pid.

The key thing, though, is to avoid mailing on machines that don't have
mail.

--Brett 




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