Changing system-time via cron...
Hi All, I measured and now I know the exact minutes and seconds the system-clock of my home-computer (no internet at all!) used to differ of the "normal" time. I plan to setup a cron job to correct this, but even after reading the list archive concerning similar topics, I really have no idea, which scheduled command I should run. So I would appreciate any help with issuing that command; I run SUSE 8.2 Pro there... Thanks, Peli
Peli wrote:
Hi All,
I measured and now I know the exact minutes and seconds the system-clock of my home-computer (no internet at all!) used to differ of the "normal" time. I plan to setup a cron job to correct this, but even after reading the list archive concerning similar topics, I really have no idea, which scheduled command I should run. So I would appreciate any help with issuing that command; I run SUSE 8.2 Pro there...
If you are sure of the difference in the rates of the two clocks, adjtimex should take care of everything for you. That only adjusts the system clock, so you'd also need to run "hwclock --systohc" occasionally, to keep the hardware clock up to date.
Peli wrote:
measured and now I know the exact minutes and seconds the system-clock of my home-computer (no internet at all!) used to differ of the "normal" time. I plan to setup a cron job to correct this
~ maybe, you will prefer to use "xntp" - the program uses, i believe, file /etc/adjtime to do just what you need [ remember to delete file /etc/adjtime after a radical adjustment by hand which will screw up the calculated time-drift . . . the file will be automaticall replaced ] best rgds _________
Peli wrote:
Hi All,
I measured and now I know the exact minutes and seconds the system-clock of my home-computer (no internet at all!) used to differ of the "normal" time. I plan to setup a cron job to correct this, but even after reading the list archive concerning similar topics, I really have no idea, which scheduled command I should run. So I would appreciate any help with issuing that command; I run SUSE 8.2 Pro there...
Why not run ntp, to automagically adjust the time. It will sync to an atomic source and correct for drift in your clock.
participants (4)
-
Darryl Gregorash
-
James Knott
-
Peli
-
pinto