The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cron issue

Discussion in 'General Discussion' started by khoonchee, Jan 30, 2004.

  1. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    Hello ,

    I have setup a cron as root to be run on every minutes.The cron sends an email to root@myservername each time it runs.I check the root crontab file and there was no "mailto" setup in the crontab file.

    Any other file that I should check to remove the emailing ?


    Thanks,
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    CRON will always email the results of a job run, if there is any, to the owner of the crontab unless a MAILTO says to send it elsewhere.

    To prevent the job producing output and therefore sending an email add the following to the end of the command line within the crontab:

    > /dev/null 2<&1
     
  3. khoonchee

    khoonchee Well-Known Member
    PartnerNOC

    Joined:
    Oct 2, 2002
    Messages:
    134
    Likes Received:
    0
    Trophy Points:
    16
    thanks ! that helps !:D
     
Loading...

Share This Page