Skip to main content

Cron not running

Comments

5 comments

  • cPRex Jurassic Moderator

    Hey there!  What happens if you manually restart the service on the command line with this command?

    /scripts/restartsrv_crond

    I would expect that to show odd output if there is something happening with the cron service on the machine.

    0
  • Alistair Mcintyre

    Hi there, here is the output...

    Waiting for “crond” to restart ………waiting for “crond” to initialize ………finished.

    Service Status
            crond (/usr/lib/systemd/system/crond.service - simple) is running with PID 2633407 (systemd check method).

    Startup Log
            Jan 05 18:20:07 host.domain.tld systemd[1]: Started Command Scheduler.
            Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) STARTUP (1.5.7)
            Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (RANDOM_DELAY will be scaled with factor 43% if used.)
            Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (running with inotify support)
            Jan 05 18:20:07 host.domain.tld crond[2633407]: (antiliespg) ORPHAN (no passwd entry)
            Jan 05 18:20:07 host.domain.tld crond[2633407]: (CRON) INFO (@reboot jobs will be run at computer's startup.)

    crond restarted successfully.

    One other aspect to this i have just noticed. I have some cronjobs that run as root. They do work. This seams to be limited to regular user accounts.

    0
  • cPRex Jurassic Moderator

    Thanks for confirming the service loads properly.  Ultimately I'm not finding much on my end about this specific issue, but checking /var/log/messages is never a bad idea for system-wide problems.

    If that doesn't get you pointed in the right direction you can always create a ticket so the server can be directly investigated.

    0
  • Alistair Mcintyre

    A reboot resolved the issue. (I hate doing them) But it was the last resort. I think PAM was stuck and not able to authenticate to run the cronjobs. Strangely, I got a warning when rebooting...

    "[root@host ~]# reboot Failed to set wall message, ignoring: Connection timed out Call to Reboot failed: Connection timed out [root@host ~]#" It did, however, perform the reboot.

    After the reboot, I was able to tail the cron logs and see entries dated today. I will continue to monitor it.

    Alistair.

    0
  • cPRex Jurassic Moderator

    I'm glad to hear that things are working well now, even if it took a reboot!  At least it ultimately wasn't something related to cPanel.

    0

Please sign in to leave a comment.