[PLUG] Running ntpdate at boot
Michael Rasmussen
michael at jamhome.us
Sun Nov 29 14:46:20 UTC 2009
On Sat, Nov 28, 2009 at 10:04:50PM -0800, Denis Heidtmann wrote:
> On Sat, Nov 28, 2009 at 9:03 PM, wes <plug at the-wes.com> wrote:
> >>
> >> So the question in its most general form is how to run ntpdate -bu
> >> pool.ntp.org without my intervention. If my attempts at this are
> >> close, what does it take to get ntpdate-debian to run during boot?
> >> Some of the docs seem to indicate that should be a default condition
> >> of ubuntu Jaunty.
> >
> > I don't run it at boot, but I do run it on a schedule. on production boxes,
> > I go once an hour. everything else can go once a day or 12 hours or whenever
> > you want really.
> >
> > I do this by adding the command to invoke ntpdate to root's crontab.
> >
> Thanks. I may resort to something like that, but there are a couple
> of problems. First is that my machine is almost never on at midnight.
> The second is that the time servers try to avoid being hit "on the
> hour" by everybody. I would have to find out how to set the time it
> is run offset by some arbitrary number of minutes.
>
> Since my machine is off as much as it is on, time updating at boot is
> a good choice. That way there is no chance that some random program
> will encounter a file with a future time.
You could set this up with anacron - which is installed by default on Ubuntu systems.
In addition to the normally scheduled jobs you could run anacron at boot with the -n and -s
options.
--
Michael Rasmussen, Portland Oregon
Be appropriate && Follow your curiosity
http://www.jamhome.us/
The fortune cookie says:
O, it is excellent
To have a giant's strength; but it is tyrannous
To use it like a giant.
-- Shakespeare, "Measure for Measure", II, 2
More information about the PLUG
mailing list