Automatic Time Syncronisation Cron?
Hi Guys,
My server time seems to go off whenever there is a restart/downtime. Now - this doesnt happen often (as it shouldnt) - but thats when it appears to happen.
For example, this weekend we took down the server to upgrade the memory. Today when I checked, I noticed it was 1-2 hrs behind.
A simple check in the WHM and clicking the "Sync time with Time Server" button under Server Time fixes it - but shouldnt it be checking this regularly?
From my understanding, this happens as part of the upcp process and I checked my cront and its there - so not sure why its not updating:
26 3 * * * /usr/local/cpanel/scripts/upcp --cron
-
From my understanding, this happens as part of the upcp process and I checked my cront and its there - so not sure why its not updating: 26 3 * * * /usr/local/cpanel/scripts/upcp --cron
Hello, It depends on the server environment (e.g. VPS, dedicated). You can verify what your server environment is with a command such as:cat /var/cpanel/envtype
For instance, if it's a virtual environment, the rdate script does not run during the nightly maintenance:Processing: Setting clock Processing command `/usr/local/cpanel/scripts/rdate` Virtual environment detected - rdate skipped
However, you could add a custom root cron job using the "crontab -e" command while logged in via SSH as root if you wanted to sync the server time on a regular basis:0 6 * * * /usr/bin/rdate -s rdate.cpanel.net 2>&1 >> /dev/null
Thank you.0 -
Thanks Michael - will give that a try, I'm sure thats it. 0
Please sign in to leave a comment.
Comments
2 comments