[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Why isn't there a cron.hourly?



Jon Haugsand said on Thu, Jun 12, 2003 at 05:18:43PM +0200:
> * christophe barbe
> >> Should think that clock synchronization is
> >> needed.  Especially since most computer clocks drift with at least 5
> >> second every day.
> >
> > I don't see how this is related to the hourly cron.
> 
> Well, on my RedHat systems I found it simplest to run 'ntpdate -u
> SERVER; hwclock --systohw' every hour.
 
The reason you don't want to do this is you'll cause the system clock to "jump"
a few seconds, possibly forward, possibly backwards.  This can cause problems,
(and does, especially if you're doing things that involving accurate timing).

chrony and ntpd both constantly slew the clock slowly towards the correct time,
but they never violate the rule of "time always goes forward", and they make
very small adjustments spread out over several hours/days.

Generally, you want to run ntpdate on boot to slam the clock to correct (since
nothing's running that cares yet), and then run chrony/ntpd to keep it correct.
The debian ntpdate package is setup to do this for you already.

M

Attachment: pgppNJzfHkIz3.pgp
Description: PGP signature


Reply to: