[Gllug] Crons and mail

Jose Luis Martinez jjllmmss at googlemail.com
Thu Mar 5 00:57:20 UTC 2009


On Wed, Mar 4, 2009 at 3:24 PM, william pink <will.pink at gmail.com> wrote:

> Hi,
>
> Currently we are using the MAIL TO variable to send out mail regarding the
> various crons that are running, unfortunately or not I have a cron that runs
> every minute that produces output which will of course cause cron to send
> out a email. What I really want to do is send out a email if theres a error,
> there is a bash script that runs a Ruby rake task so I presume there is a
> way of manipulating the output of that or perhaps log to a file that can be
> tailed+grepped for any obvious error keywords (which doesn't sound like a
> great solution).
>
> Any ideas?


My suggestion:

Use logger in your scripts to collect any and all important information.

Then use swatch to find patterns in the log file (i.e. when there is an
error), swatch can email notifications if required.


>
>
> Thanks,
> Will
>
> --
> Gllug mailing list  -  Gllug at gllug.org.uk
> http://lists.gllug.org.uk/mailman/listinfo/gllug
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20090305/b4c2d7c5/attachment.html>
-------------- next part --------------
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug


More information about the GLLUG mailing list