[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Cron jobs



Brian Schramm wrote:
  >OK I have looked at the cron and crontabs man pages to no avail.  I would
  >like to have a script that runs every 15 minutes only send me an email if
  >it errors.  The script exits out if certain conditions are good.  I have
  >it exiting with an exit command in a if statement.
  >
  >What I want is it to email me if it does not exit out prematurely.  That
  >way I can tell when I had to run the script so I can get a feal as to how
  >often I end up with a problem.
  >
  >Any ideas?
 
If anything is sent to standard output or standard error, cron will
automatically mail it to the user who owns the cron job.

So send anything you don't want to see to /dev/null.

-- 
      Vote against SPAM: http://www.politik-digital.de/spam/
                 ========================================
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight                              http://www.lfix.co.uk/oliver
               PGP key from public servers; key ID 32B8FAA1
                 ========================================
     "Therefore, my beloved brethren, be ye stedfast, 
      unmoveable, always abounding in the work of the Lord, 
      forasmuch as ye know that your labor is not in vain 
      in the Lord."    1 Corinthians 15:58 



Reply to: