cron email notifications

Discussion in 'Mac Programming' started by Mirrorball, Jul 31, 2008.

  1. Mirrorball macrumors member

    Joined:
    Aug 6, 2007
    #1
    Does anyone knows how to turn off email notifications everytime cron runs? I'm updating an svn source tree three times a day and I don't want to be notified by email.
     
  2. tedsmith3rd macrumors member

    Joined:
    Aug 30, 2006
    Location:
    US
    #2
    When a program has output, that output is emailed to the relevant user or admin. You could direct the output to null, or better yet have it logged in syslog. This would let you check the log if something goes castors up.

    End your crontab entry like so:
    Code:
    svnOrWhatever 2>&1 | logger -p local0.notice -t "Nightly SVN"
    
    To still get emails when there is output on standard error just drop the "2>&1" redirector.
     
  3. Mirrorball thread starter macrumors member

    Joined:
    Aug 6, 2007
    #3
    Thanks! I'll direct the output to null, because it's nothing important.
     

Share This Page