Alec <[EMAIL PROTECTED]> writes:

> Hi
> 
> I make backups using a cron job and I set MAILTO=""
> Can I configure cron to mail me
> a) *only* when there were errors
> b) email only STDERR (not STDOUT)
> 


I assume you're asking about some type of special cron functionality
which e-mails automatically... however, I would probably do this with a
script... i.e.

#! /usr/bin/sh

#backup my stuff
foo_bar_backup_tool baz.bktarget;

#howl if there's an error
if [ $? -ne 0 ]
then
        echo "Oh crap!" | mail -s "bk error" [EMAIL PROTECTED]
fi


HTH...

Reply via email to