[ntp:questions] Re: NTP and Cron

Tapio Sokura oh2kku at iki.fi
Tue Nov 30 12:07:30 UTC 2004


Steven Hajducko wrote:
> Is it possible for NTP to reset the time back enough that cron will fire off
> jobs twice?

I guess it is possible, if cron doesn't keep records of the jobs it has 
run recently and the time is stepped backwards. You can prevent ntpd 
from stepping the time with the command line parameter "-x", with -x the 
time is always slewed. This also means that if a computer's clock, for 
some reason, has a large offset compared to "true" time, it will take a 
long time for the clock to catch up the difference. Without -x the 
default is to step the clock if it is more than 128 ms off and slew it 
if the difference is less than 128 ms. Slewing makes sure the time is 
always monotonously increasing and that there are no noticeable jumps in 
either direction.

I would check the structure of the NTP synchronization network as well, 
taking into account possible failure scenarios. After initial 
synchronization, steps of 15 seconds (or any steps for that matter) 
should not happen in a well-working NTP network.

   Tapio



More information about the questions mailing list