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

Bryan Horstmann-Allen bdha at mirrorshades.net
Mon Oct 25 02:56:40 PDT 2010


+------------------------------------------------------------------------------
| On 2010-10-25 10:44:26, Peter Tribble wrote:
| 
| 1. I know that many of my users have email rules set to match the
| existing string in the subject, so this would be seen as an incompatible
| change. (Although personally I would rather they fix their cron jobs so
| they didn't need to redirect all the output straight into the junk folder.)

File it as a FLAG DAY and move on. The benefits outweight people not having
mail filtered properly. And if they're doing it right, they aren't solely using
the subject anyway.
 
| 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.)

Set CRON_SUBJECT per-job at the beginning of the command?

What I'd personally like to see is cron consume all the features of
App::Cronjob[1] eventually. However, this is a good start that adds immediate
benefit with little risk.

I would argue for integrating this now, and then working out what cron should
really do. Incremental improvements make it easier to change mid-flight, etc.

[1] http://search.cpan.org/~rjbs/App-Cronjob-1.102310/bin/cronjob,
    http://advent.rjbs.manxome.org/2009-12-07.html
-- 
bdha
cyberpunk is dead. long live cyberpunk.



More information about the Developer mailing list