This shows you the differences between two versions of the page.
linux:setting_the_clock_using_rdate [2020/06/01 22:53] |
linux:setting_the_clock_using_rdate [2020/06/01 22:53] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Setting the Clock Using rdate ====== | ||
+ | First, you'll need rdate installed. Note that rdate uses an older time protocol that is not supported by all NIST servers, but is supported by most. | ||
+ | |||
+ | Just add a cronjob that runs rdate once a day. You can modify this to run every hour as well. | ||
+ | |||
+ | Before you start, find out where rdate is located by running: | ||
+ | |||
+ | which rdate | ||
+ | |||
+ | It's typically installed in /usr/bin or /usr/sbin. Modify the cron job to reflect the correct path. | ||
+ | |||
+ | Here are all the steps. | ||
+ | |||
+ | * Edit the root cronjob | ||
+ | |||
+ | crontab -e | ||
+ | |||
+ | * Add the following line | ||
+ | |||
+ | 0 6 * * * /usr/sbin/rdate -s time-c.timefreq.bldrdoc.gov | ||
+ | |||
+ | * Save and close |