User cron jobs not being logged
I know the cronjobs are running since the scripts themselves generate various logs and alter certain things, all of this is easily verified.
I looked around a bit and the cron log is supposed to be at /var/log/cron
Sure enough, there is a file there and it has entries, but only for root user.
For other users there are no entries, besides the ones that talk about LIST and such.
This makes debugging cronjobs for users quite a bit harder as you can imagine.
Is there a common issue that could cause this?
Thank you.
-
Hello, I created a test cron job that runs every minute under a cPanel account with a simple "php -v" command: # cat /var/spool/cron/example01 SHELL="/bin/bash" * * * * * php -v
Upon monitoring /var/log/cron, I see the correct log entry is populated:Jun 21 08:40:01 hostname CROND[3391]: (example01) CMD (php -v)
Can you verify that taking the same steps results in no entry to the /var/log/cron log file on your system? If so, does restarting the crond service via "service crond restart" make a difference? Thank you.0 -
Hello, I created a test cron job that runs every minute under a cPanel account with a simple "php -v" command:
# cat /var/spool/cron/example01 SHELL="/bin/bash" * * * * * php -v
Upon monitoring /var/log/cron, I see the correct log entry is populated:Jun 21 08:40:01 hostname CROND[3391]: (example01) CMD (php -v)
Can you verify that taking the same steps results in no entry to the /var/log/cron log file on your system? If so, does restarting the crond service via "service crond restart" make a difference? Thank you.
Thank you for your reply. I have added php -v to run every minute on this account, after waiting a few minutes, there are no entries for that account in cron log aside from the list, edit and reload. It does send an email to the correct address, so that part works. Restarting the service does not result in a change unfortunately. I also tested it on some other users and the same problem occurs.0 -
Hello, Does this system use CageFS with CloudLinux? If not, feel free to open a support ticket using the link in my signature so we can take a closer look. Thank you. 0
Please sign in to leave a comment.
Comments
3 comments