Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2003
    Location
    Atlanta
    Posts
    134

    Red face Unanswered: Oracle crontab job and email to snmp

    I have crontab jobs listed under Oracle user and some of the jobs run at 10 minute frequency and flooding the SNMP server on Linux server. Is there a way I run these jobs but do not get email from cron ? I maintain the log files though for checking status of these jobs. Checked cron utility but it dies not say how can I stop sending the status through mail. Any help please ??

    Thanks, Vinnie

  2. #2
    Join Date
    Jul 2006
    Posts
    49
    Cron should only send mail if the job produced a not-null output stream to either stdout or stderr. I think if you specify the -m parameter then cron always sends mail regardless of whether the job produced output or not. To prevent mail try redirecting the job's output away from standard output. (Sorry, but I don't know how to do that on Linux).
    -Mark

  3. #3
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking



    In your crontab, re-direct the stdout and stderr to a file, for example:
    Code:
    00 19 * * 1-5 /oracle/local/utl/export_backup.ksh DB02 >/oracle/local/log/DB02_export_backup.log 2>&1

    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

  4. #4
    Join Date
    May 2004
    Location
    Dominican Republic
    Posts
    721
    or just ignore it (redirect it to /dev/null).

  5. #5
    Join Date
    Jan 2003
    Location
    Atlanta
    Posts
    134
    Many thanks for the suggestions and it worked.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •