The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

User cron jobs not being logged

Discussion in 'General Discussion' started by Axitech, Jun 21, 2017.

Tags:
  1. Axitech

    Axitech Registered

    Joined:
    Jun 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    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.
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,204
    Likes Received:
    1,297
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello,

    I created a test cron job that runs every minute under a cPanel account with a simple "php -v" command:

    Code:
    # cat /var/spool/cron/example01
    SHELL="/bin/bash"
    * * * * * php -v
    Upon monitoring /var/log/cron, I see the correct log entry is populated:

    Code:
    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.
     
  3. Axitech

    Axitech Registered

    Joined:
    Jun 21, 2017
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Belgium
    cPanel Access Level:
    Root Administrator
    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.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,204
    Likes Received:
    1,297
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
Loading...

Share This Page