Re: cron on a system without a hardware persistant clock

2011-09-29 Thread Arnt Karlsen
On Tue, 27 Sep 2011 10:11:33 +0100, David wrote in message <201109271011.33513.david.goodeno...@btconnect.com>: > Does anyone know if there is a way to tell and of the crons to > ignore unset times? ..keep your script _simple_, on shutdowns or reboots etc (and unless you have very short life di

Re: cron on a system without a hardware persistant clock

2011-09-29 Thread Chris Davies
Bob Proulx wrote: > I would look for a file on the > filesystem that is always active on the system. I would extract the > time from that file and use it as the basis for the new system time. > Then at the very least you would have monotonically increasing time. That's a really good idea. If you

Re: cron on a system without a hardware persistant clock

2011-09-28 Thread Bob Proulx
David Goodenough wrote: > Bob Proulx wrote: > > Then I would create a new script that would set the clock to as > > reasonable of a value as possible. You don't have a real time value > > yet but most importantly you don't want to set it to a time that is > > before the system was stopped. So I w

Re: cron on a system without a hardware persistant clock

2011-09-28 Thread Camaleón
On Wed, 28 Sep 2011 10:08:27 +0100, David Goodenough wrote: > On Tuesday 27 Sep 2011, Camaleón wrote: >> On Tue, 27 Sep 2011 10:11:33 +0100, David Goodenough wrote: >> > I have some small single board systems on which I run Debian. They >> > have clocks, but they are not battery backed and so rese

Re: cron on a system without a hardware persistant clock

2011-09-28 Thread David Goodenough
On Wednesday 28 Sep 2011, Bob Proulx wrote: > David Goodenough wrote: > > I have some small single board systems on which I run Debian. > > They have clocks, but they are not battery backed and so reset > > to zero for each run. > > And by reset to zero you mean the date loaded at boot time from t

Re: cron on a system without a hardware persistant clock

2011-09-28 Thread David Goodenough
On Tuesday 27 Sep 2011, Camaleón wrote: > On Tue, 27 Sep 2011 10:11:33 +0100, David Goodenough wrote: > > I have some small single board systems on which I run Debian. They have > > clocks, but they are not battery backed and so reset to zero for each > > run. > > You mean that system always start

Re: cron on a system without a hardware persistant clock

2011-09-27 Thread Bob Proulx
Camaleón wrote: > David Goodenough wrote: > > I then set the time using NTP once I have a network connection - > > wireless as it happens and therefore not entirely predictable in how > > quickly it will connect. > > Mmm... I would be careful with this, NTP may refuse to sync if the offset > betw

Re: cron on a system without a hardware persistant clock

2011-09-27 Thread Bob Proulx
David Goodenough wrote: > I have some small single board systems on which I run Debian. > They have clocks, but they are not battery backed and so reset > to zero for each run. And by reset to zero you mean the date loaded at boot time from the hardware clock is always "Thu, 01 Jan 1970 00:00:00 +

Re: cron on a system without a hardware persistant clock

2011-09-27 Thread Camaleón
On Tue, 27 Sep 2011 10:11:33 +0100, David Goodenough wrote: > I have some small single board systems on which I run Debian. They have > clocks, but they are not battery backed and so reset to zero for each > run. You mean that system always starts with no date set? :-o > I then set the time us

Re: cron on a system without a hardware persistant clock

2011-09-27 Thread Chris Davies
David Goodenough wrote: > I could use update-rc.d to disable cron, and only enable it > once wpa_supplicant has established the connection, but then > what if the wireless link goes down and back up while the > hardware is powered up, in which case it would get restarted > unnecessarily. I thin

Re: cron on a system without a hardware persistant clock

2011-09-27 Thread François TOURDE
Le 15244ième jour après Epoch, David Goodenough écrivait: [...] > I could use update-rc.d to disable cron, and only enable it > once wpa_supplicant has established the connection, but then > what if the wireless link goes down and back up while the > hardware is powered up, in which case it woul

cron on a system without a hardware persistant clock

2011-09-27 Thread David Goodenough
I have some small single board systems on which I run Debian. They have clocks, but they are not battery backed and so reset to zero for each run. I then set the time using NTP once I have a network connection - wireless as it happens and therefore not entirely predictable in how quickly it will c