System Time Synchronization Procedure [closed]

I am looking for procedure which I can execute in cron to synch the system time in clustered servers. Can any of the experienced SME's please help?


NTP is the answer.
NTP is always the answer to "How do I synchronize the clocks on some machines?"

A full tutorial on setting up NTP is far beyond the scope of this site, however you will find tutorials all over the internet. The gist of it is:

  1. Install the NTP software if your OS doesn't already come with it.
    (If you're really in a bind and need to build it yourself source is available at ntp.org)
  2. Run the NTP daemon on one of your machines as a "server"
    (point this machine at some servers from pool.ntp.org to get its time)
  3. Run the NTP daemon on the rest of your machines, pointing them to your local NTP server configured in (2).

This will produce a far better synchronization than any cron job could manage.