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.

Can't add Cron job

Discussion in 'General Discussion' started by nakamura00, Sep 3, 2007.

  1. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Hi,

    I try to add a cron job in cPanel but it not show in entry after added.

    when I go back it show empty !

    I try to chmod crontab

    #chmod 4755 /usr/bin/crontab
    #chmod 1777 /var/spool/cron

    And I try to update CP
    #/scripts/upcp

    But not working.

    I'm go to /var/spool/cron It don't show user to create cron job it's show root only.

    How to resolve them ?

    Thank you !
     
  2. madaboutlinux

    madaboutlinux Well-Known Member

    Joined:
    Jan 24, 2005
    Messages:
    1,052
    Likes Received:
    2
    Trophy Points:
    38
    Location:
    Earth
    Ask someone to login to your server and check. As far as I can see what you have done is correct so far.
     
  3. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I need resolved them on my self.

    Anyone know the problem possible with...?
     
  4. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Anyone advise here ?
     
  5. linux.newbie

    linux.newbie Well-Known Member

    Joined:
    Sep 8, 2006
    Messages:
    73
    Likes Received:
    0
    Trophy Points:
    6
    Just a crazy thought, crond running ?
    service crond restart
    :D
     
  6. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I try to restart crond and restart server but not resolved.

    My cPanel 11.11.0-S16789
     
  7. jackal

    jackal Well-Known Member
    PartnerNOC

    Joined:
    Feb 23, 2002
    Messages:
    708
    Likes Received:
    0
    Trophy Points:
    16
    chmod a+s /usr/bin/crontab

    Maybe
     
  8. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Not working...
     
  9. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Whats the cron look like you're adding?
     
  10. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    0 23 * * * php -q /home/user/public_html/members/schedules/generate_invoice.php
     
  11. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,469
    Likes Received:
    197
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
    Not sure if this'll help, but try it. Remove the word SPACE and leave one.


    php -q /home/user/public_html/members/schedules/generate_invoice.phpSPACE/home/user/public_html/members/schedules/


    I've got a cron in my cPanel running for years that updates a folding@home stats page that looks like this. Works perfectly.


    php -q -f /home/username/public_html/stats/fah.php /home/username/public_html/stats/ cron 0 10
     
  12. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    Thx for advise but it not working... :(
     
  13. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Does it show up when exeucting the following as root:

    Code:
    crontab -l -u username
    
    
     
  14. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    no crontab for username

    * username = username account for hosting


    It's look like cronjob doesn't create username in /var/spool/cron

    How to repair cronjob system ?
     
  15. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    Which version of cPanel are you using? full version number please.

    Also,

    What is your Operating System?

    Does /etc/cron.allow exist?

    Can you create a crontab manually from the command line as the user (not as root)?
     
  16. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    WHM 11.2.0 cPanel 11.11.0-S16908
    CENTOS Enterprise 5 x86_64 - WHM X v3.1.0

    Does /etc/cron.allow exist?
    - Yes, their exist

    It's show
    -------------------
    guest
    mailman
    -------------------

    Can you create a crontab manually from the command line as the user (not as root)?
    - How to do ?

    I think it can but not working.
     
  17. cPanelKenneth

    cPanelKenneth cPanel Development
    Staff Member

    Joined:
    Apr 7, 2006
    Messages:
    4,460
    Likes Received:
    22
    Trophy Points:
    38
    cPanel Access Level:
    Root Administrator
    The existence of /etc/cron.allow will prevent any user not explicitly named in that file (aside from root) from creating cron jobs. If you are going to allow all users to create cron jobs, then simply remove the /etc/cron.allow file. Otherwise, you need to add the user names you want to grant access to cron to that file, one name per line.

    Once one of those steps is done, your users should be able to create cron entries from within cPanel.
     
  18. nakamura00

    nakamura00 Active Member

    Joined:
    Sep 3, 2007
    Messages:
    29
    Likes Received:
    0
    Trophy Points:
    1
    I just add username on to/etc/cron.allow

    That's working !

    I need to say "T h x a l o t" ;-)
     
  19. mstuebner

    mstuebner Well-Known Member

    Joined:
    May 13, 2007
    Messages:
    50
    Likes Received:
    0
    Trophy Points:
    6
    I cannot confirm that, running:

    WHM 11.2.0 cPanel 11.11.0-R16983
    CENTOS Enterprise 5 i686 - WHM X v3.1.0

    It doesn't make any difference whether or not the cron.allow is there with the users name in or this file is deleted. cPanel's cron menu doesn't create anything.

    Still looking for a solution.
     
  20. vmicovic

    vmicovic Well-Known Member

    Joined:
    Sep 4, 2007
    Messages:
    95
    Likes Received:
    0
    Trophy Points:
    6
    I have same problem here, any user who try to create cronjob, faild.

    I try myself to create but nothing, when i list like root on shell crontab of some users, he told that no have crobjob of that user and in cPanel of user crontab is empty!
    But, when i manualy create cronjob from shell, that working, but still dont see in cPanel that crontab exist.

    how to fix this?

    my system is:
    WHM 11.2.0 cPanel 11.11.0-R16983
    CENTOS Enterprise 5 i686 - WHM X v3.1.0


    p.s: sorry for bad English.


    and tnx. for advice.
     
    #20 vmicovic, Oct 1, 2007
    Last edited: Oct 1, 2007
Loading...

Share This Page