Log location for cron jobs set from cPanel

nitaish

Well-Known Member
PartnerNOC
Jan 6, 2006
137
3
168
Mulund, 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?
 

SysSachin

Well-Known Member
Aug 23, 2015
604
48
28
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,202
363
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.