Skip to main content

User cron jobs doesn't run

Comments

12 comments

  • Jcats
    Are you creating the cronjob in cPanel or SSH?
    0
  • Erik Ellsinger
    I created them in cPanel.
    0
  • Jcats
    Strange, in SSH using: # crontab -u USER -l show the job you have setup in cPanel?
    0
  • Erik Ellsinger
    Yes it does:
    root@server [~]# crontab -u domain -l 0 23 * * * lsphp /home/domain/domains/domain.se/cli/akeeba-backup.php > /dev/null 2>&1 20 15 * * * lsphp /home/domain/domains/domain.se/cli/akeeba-update.php > /dev/null 2>&1 0 1 * * * lsphp /home/domain/domains/domain.se/cli/admintools-update.php > /dev/null 2>&1 0 2 * * * lsphp /home/domain/domains/domain.se/cli/admintools-dbrepair.php > /dev/null 2>&1 * * * * * php /home/domain/domains/domain.se/cli/garbagecron.php 0 4 * * * lsphp /home/domain/domains/domain.se/cli/deletefiles.php > /dev/null 2>&1 0 5 * * * lsphp /home/domain/domains/domain.se/cli/update_cron.php > /dev/null 2>&1
    0
  • Jcats
    Your running CL? This is just a random shot in the dark but can you try disabling cagefs for that user.
    # /usr/sbin/cagefsctl --disable domain
    then see if they start firing.
    0
  • Erik Ellsinger
    Yes I am, I run Cloudlinux 7.1 and WHM 11.50.1 build 3. Doesn't seem to make a difference. I ran: cagefsctl --disable domain Restarted crond, save the cron job again and tailed /var/log/cron. Same thing:
    Sep 25 22:08:22 server crond[232455]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 82% if used.) Sep 25 22:08:22 server crond[232455]: (CRON) bad hour (/etc/cron.d/lvemanager-selector) Sep 25 22:08:22 server crond[232455]: (CRON) INFO (running with inotify support) Sep 25 22:08:22 server crond[232455]: (CRON) INFO (@reboot jobs will be run at computer's startup.) Sep 25 22:11:18 server crontab.relink.1440704789[232724]: (domain) LIST (domain) Sep 25 22:11:19 server crontab.relink.1440704789[232726]: (domain) LIST (domain) Sep 25 22:11:27 server crontab.relink.1440704789[232730]: (domain) LIST (domain) Sep 25 22:11:31 server crontab.relink.1440704789[232732]: (domain) LIST (domain) Sep 25 22:11:31 server crontab.relink.1440704789[232733]: (domain) REPLACE (domain) Sep 25 22:11:37 server crontab.relink.1440704789[232735]: (domain) LIST (domain) Sep 25 22:11:37 server crontab.relink.1440704789[232736]: (domain) REPLACE (domain) Sep 25 22:12:01 server crond[232455]: (domain) RELOAD (/var/spool/cron/domain)
    0
  • Jcats
    What does:
    yum list installed |grep -i cron
    give you
    0
  • Erik Ellsinger
    root@server [~]# yum list installed |grep -i cron cpanel-perl-514-Config-Crontab.x86_64 1.40-1.cp1146 installed cpanel-perl-514-Set-Crontab.x86_64 1.03-1.cp1146 installed cronie.x86_64 1.4.11-13.el7 @base cronie-anacron.x86_64 1.4.11-13.el7 @base crontabs.noarch 1.11-6.20121102git.el7 @anaconda
    0
  • Erik Ellsinger
    Ok so apparently it doesn't work to run the lsphp command with cron. It work fine when I run it from the CLI as the user but cron won't run it. The cron jobs works fine when I use the php command instead. But even if the cron jobs run now it doesn't show up in the cron log.
    0
  • Jcats
    You may need to specify the full path to lsphp. /usr/local/bin/lsphp As far as it not showing up in the cron log, that is odd, unless Centos7 stores each user's cron logs in a different area possibly? I have yet to dive into Centos7 but I haven't run into the issue you are seeing on Centos6.
    0
  • Erik Ellsinger
    I looked at another CentOS 7 cPanel server and it's the same thing there, the cron log is filled with basically what I pasted in a earlier post in this thread.
    0
  • cPanelMichael
    Hello :) Please let us know if the following commands help address this issue:
    /bin/systemctl restart crond cagefsctl "force-update
    Also, do you notice any error messages if you run "crontab -e" while logged in via SSH as the user? Thank you.
    0

Please sign in to leave a comment.