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?
There could be several things caused this. Here are ways to debug your crons:
Run it manually from shell:
php yourcron.php
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