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.

Log location for cron jobs set from cPanel

Discussion in 'General Discussion' started by nitaish, Dec 21, 2016.

  1. nitaish

    nitaish Well-Known Member
    PartnerNOC

    Joined:
    Jan 6, 2006
    Messages:
    129
    Likes Received:
    1
    Trophy Points:
    168
    Location:
    Mulund, India, India
    One of my customers has set the timezone as Indian Standard Time in his server which is based in US datacenter. He has set a cron job to execute every wednesday at 16:30. The cron job executes a script which sends out emails. He claims that the script is sending out the script as per EST timezone. I am unable to find the entry of the cron job in the /var/log/cron file. How can I find out when exactly did the cron job run?
     
  2. SysSachin

    SysSachin Well-Known Member

    Joined:
    Aug 23, 2015
    Messages:
    543
    Likes Received:
    39
    Trophy Points:
    28
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,
    You have to check cpanel user cron entry through command line using the below command.

    Code:
    crontab -l -u USERNAME 
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    37,086
    Likes Received:
    1,288
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @nitaish,

    You can view the user's cron job directly in the following file:

    Code:
    /var/spool/cron/$username
    Check to see when this cron job is configured to run, and then review /var/log/cron for that time period to see if it's running as expected. If it's not running or is running at the wrong time, try restarting the "crond" service to see if that helps to address the issue:

    Code:
    service crond restart
    There's also a thread here worth checking out:

    Server time not using right timezone

    Thank you.
     
Loading...

Share This Page