Sync time using cPanel cron to resolve clock drift issue

You may see the clock drift issue in many virtulization software like Hyper-V, XEN, Vmware, KVM etc. If the server time is critical for you, you will need to sync the time regularly. This will make sure that your clock doesn’t go ahead from the actual time.

For cPanel server, you can sync the time regularly via cron. You can set the following cron to sync your server time:

*/1 * * * * rdate -s rdate.cpanel.net

To add the above cron, you will need the server’s root access.

[1] Login to your server via SSH

[2] Run the following command to add the above cron command:

crontab -e

[3] Add the cron command after the last cron and save it

Once the cron is save successfully, it should sync your server time.

Leave a Reply