Cpanel does not run my cron jobs

Alan picture Alan · Nov 6, 2013 · Viewed 11.3k times · Source

I have cron jobs in cPanel that are scheduled every night. Yesterday, I noticed that these cron jobs haven't run since 2 days ago. I checked the cron log in /var/log/cron, and it shows me errors when trying to access the file.

Errors:

Nov  6 11:25:01 web2 crond[17439]: (laptoplc) ERROR (failed to change user)
Nov  6 11:25:01 web2 crond[17447]: (projecto) ERROR (failed to change user)
Nov  6 11:25:01 web2 crond[17446]: (CRON) ERROR (setreuid failed): Resource temporarily unavailable
Nov  6 11:25:01 web2 crond[17446]: (laptoppa) ERROR (failed to change user)

What could be the problem?

Answer

jaycode picture jaycode · Nov 13, 2013

There could be several things caused this. Here are ways to debug your crons:

  1. Run it manually from shell:

    php yourcron.php

  2. Add logging from your cron file, maybe by adding error_log('check if running'); to see if it is indeed running.

As suggested above it could be permission issue too. Add execute permission to your cron:

chmod 755 yourcron.php