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.

No email notification received from cron job

Discussion in 'E-mail Discussions' started by shivprasad, Sep 15, 2004.

  1. shivprasad

    shivprasad Registered

    Joined:
    Sep 15, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    i have script which send email ..
    It is working fine when run from browser .. i receive email.

    But when i set this file as cron job it is not dispatching email...
    cron job is working fine as i did some database updates..
    cron job executes completes with database updates but do not send any email...

    also i don't receive any email notification...

    Please HELP
     
    #1 shivprasad, Sep 15, 2004
    Last edited: Sep 15, 2004
  2. drmike

    drmike Active Member

    Joined:
    Jul 8, 2004
    Messages:
    31
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Charlotte, NC
    On the advanced cron edit page in cpanel, there's a box to type in an email address. Are you typing one in there? Also is it a full address and not just a username?

    -drmike
     
  3. shivprasad

    shivprasad Registered

    Joined:
    Sep 15, 2004
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    yes, in the box i had my email typed as shivprasad@sibzsolutions.com ...
    but i am not receiving any notification
     
  4. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    I'm searching for a solution to this problem also - and found this topic, amongst others. No answeres yet though. I've tried several different email address formats in the email entry box and none seem to get through (although the cron job runs successfully). On two different servers with different webhosts, so I'm guessing it's something I'm doin wrong. But I haven't a clue what :confused: ...
     
  5. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Any suggestions anyone :( ?

    What do you do for crontabs? Can you just enter any email address in the email box for sending cron information to and it works? Or is there something else you need to check also?
     
  6. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Are you the server admin? If so, you should check the crontab file for the user account in /var/spool/cron/username and make sure it's formatted correctly. Also check the cron log and the exim mainlog when a cron job is triggered and look for errors/messages to see what is happening.

    If you're an end-user you need to speak to your web hosting provider.

    As an aside, please try and avoid digging up 2 year old threads, please.
     
  7. macmend

    macmend Registered

    Joined:
    Feb 27, 2006
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    Where is the cron log?
     
  8. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    On RH derivatives it's:

    /var/log/cron
     
  9. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Sorry, I just did a search for email + cron and this was what came up. I thought it would be more appropriate to continue a discussion already started rather than start a new thread on the same topic. :(

    I'm looking through cpanel file manager now for those files you mentioned but I'm guessing they're only accessible to the server admin - which I'm not. I'll look in WHM also.
     
  10. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    ... which I can't find.
     
  11. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,475
    Likes Received:
    20
    Trophy Points:
    38
    Location:
    Go on, have a guess
    Then you'll have to speak to your web hosting provider.
     
  12. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Ok, thanks.

    A solution is to add ";echo" to the end of the cronjob line which works for any email address entered. Problem now is that all the text of the cronjob instruction (including db password) is sent in the email subject line. Is there an easy way to modify the subject line?

    I'll search for more information but if anyway has a quick reply for me I'd appreciate it. Thanks :) .
     
  13. surf chick

    surf chick Active Member

    Joined:
    Feb 12, 2004
    Messages:
    28
    Likes Received:
    0
    Trophy Points:
    1
    Actually, I don't think that was a solution. After messing about trying different things, and asking host to help solve problem, finally emails were being sent. But I don't know how or why it's working now. I assume the host did something but they didn't say what. If I get enlightenment, I'll try to remember to update this topic.

    Still have the problem of the cronjob being sent in the instruction line. If anyone has a suggestion as to how to control the subject line of what the cron daemon sends...
     
Loading...

Share This Page