Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Cron and email

Discussion in 'E-mail Discussion' started by rahuldas14, Sep 22, 2011.

  1. rahuldas14

    rahuldas14 Member

    Joined:
    Nov 24, 2009
    Messages:
    7
    Likes Received:
    0
    Trophy Points:
    51
    I want to run a script as a cron. How can I get the output of it mailed to me?
    Please dont tell me to modify the script.
     
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,608
    Likes Received:
    32
    Trophy Points:
    238
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    In /var/spool/cron/username file where username is the cPanel username, add the following above the cron in question:

    MAILTO="email@mydomain.com"

    This would only be the case if you have multiple cron jobs and only want this one cronjob mailed to you. Otherwise, in cPanel, you have an option for mail to be sent for all of that user's cronjobs.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. echoutt

    echoutt Member

    Joined:
    Sep 23, 2011
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    51
    cPanel Access Level:
    Reseller Owner
    still confused about cronjob :(
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,396
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Could you let us know what in specific you are confused about? You can view our documentation on cron jobs at:

    Cron Jobs

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice