[Gllug] Crons and mail

Richard Jones rich at annexia.org
Wed Mar 4 15:40:32 UTC 2009


On Wed, Mar 04, 2009 at 03:24:16PM +0000, william pink wrote:
> 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).

I was fairly sure that MAILTO doesn't send mail if the job is silent.
So the solution would be to make the job only print stuff on error :-)

Rich.

-- 
Richard Jones
Red Hat
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list