[illumos-Developer] webrev: 374 cron should send more useful mail

Joshua M. Clulow josh at sysmgr.org
Mon Oct 25 04:06:29 PDT 2010


On Mon, Oct 25, 2010 at 8:44 PM, Peter Tribble <peter.tribble at gmail.com> wrote:
> 2. In a sense, I don't think this change actually goes far enough. It
> replaces a fixed string with a variable string. (Which looks really ugly if
> your cron job isn't a simple command but a complex shell expression.)
> What it doesn't do is what I really would prefer to see, namely a way to
> define the subject on a per-cronjob basis. (Currently, I simply wrap all
> my cron jobs in a script that emits the mail messages itself rather than
> relying on cron to do it, and the primary reason for doing so is to be
> able to set the subject to something sensible.)
>
> So, what I would be looking for is a mechanism that allows the admin and/or
> the user to specify the subject. That's clearly a rather bigger change than
> you've proposed so far, though. (I wonder whether the existing mechanism
> to handle HOME/SHELL/TZ could be extended for this case.)

OK, then, how does this take your fancy:
   http://cr.illumos.org/view/7jom8acp/

We can now accept crontab entries like this:

   MAIL_SUBJECT=Not the BEES
   * * * * * date

Also, an empty MAIL_SUBJECT= will cause crontab to error out when saving.

-- 
Joshua M. Clulow
UNIX Admin/Developer
http://blog.sysmgr.org



More information about the Developer mailing list