Results 1 to 5 of 5

Thread: cron emails

  1. #1
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    432

    cron emails

    Hi

    I am running a RedHat system with Cpanel. On that machine I have a cron job that runs every hour and every time it runs I get a email about it.

    How do I turn the email notification off?
    Checkout www.crunzh.com for nice freeware programs. Including a program for monitoring your webserver.
    Any opinions in this post, unless otherwise noted, are my own personal opinions.

  2. #2
    Join Date
    Jun 2003
    Posts
    961
    does the cronjob return some output?

    if so, try sending it to /dev/null
    e.g.
    0 * * * * * /my/script &> /dev/null

    it should stop the emails

  3. #3
    Join Date
    Feb 2002
    Location
    Vestal, NY
    Posts
    1,378
    In WHM, you may want to stop WHM from forwarding you root's mail.
    H4Y Technologies LLC Check out our new website!
    "Smarter, Cheaper, Faster" - SMB, Reseller, VDS, Dedicated, Colo hosting done right.

    ZERO PACKETLOSS, ZERO DOWNTIME Dedicated and Colo - USA: IA, CA, NC, OR, NV
    **http://h4y.us**
    Voice: (866)435-5642. *** Email: askus at host4yourself d0t com

  4. #4
    Join Date
    Mar 2004
    Posts
    34
    MAILTO=""

    Add this to your cron file and you'll get no exit reports by default.

  5. #5
    Join Date
    Feb 2004
    Posts
    772

    Smile

    Hi msh,

    You can disable email notification by cron job by appending ">/dev/null 2>&1" (without quotes) at the end of cron entry.
    If you want to redirect the output of the cron to a log file.
    You can do it by replacing the above entry with "> {logfile path and name}" (without quotes).

    Regards,


Posting Permissions

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