Subject: None
To: None <tech-userlevel@netbsd.org>
From: Bruce J.A. Nourish <bjan+tech-userlevel@bjan.net>
List: tech-userlevel
Date: 09/30/2003 12:03:07
Hey Everyone,

There seems to be a number of issues with /etc/{daily,weekly,monthly}.

misc/14825: asks for all the scripts to be unified, so that (for
example) setting rebuild_locatedb=YES in daily.conf would cause
the locatedb to be rebuild daily, rather than weekly. Greg Woods
then suggested that our whole framework should be replaced by
something like FreeBSD's periodic(8).

misc/11011: points out that when bringing a laptop up from several
days or more of bieng suspended, the daily/weekly scripts immediately
kick in and start several very battery-expensive operations (i.e.
find / ...). John Hawkinson replied, suggesting that the multiple
find / operations could probably be eliminated, and mentioned some
other problems with daily/weekly scripts on laptops.
 
Several other open PR's ask for tweaks or extra options. See: 
bin/17029, bin/20272, bin/22148, bin/22230, misc/7716, misc/11046
misc/17306, misc/18628.

*My* beef with the current setup is this: I shut down my PC when I'm
not at home (most of the day) and asleep (a depressingly small
fraction of the night). As I do, however, usually make it to bed
before 3AM, /etc/{daily,weekly} never run.

I've looked at FreeBSD's periodic(8), and it's rather more modular
and extensible than our framework. It does not, however, solve the
problem that I'm referring to. Slackware Linux does something
similar to FreeBSD, just not quite as well.

The two solutions that I've seen are anacron (anacron.sf.net) and
a limited bash-script clone of anacron in Gentoo Linux. Basically,
for each periodic job, a timestamp is kept under /var. Several times
an hour, a script is run that checks the age of each timestamp
relative to the period of the corresponding job.

Basically, the problem has irritated me to the point that I want
to fix it. I figure I may as well fix other people's problems at
the same time. I also realize that many NetBSD systems _are_ 
AC powered and up 24/7, so very little of this applies to them.

Is there any consensus as to what would be required/unacceptable
in a new periodic implementation? I have lots of ideas and some
running code, but I want to get some input on this before I go
any further.
-- 
Bruce J.A. Nourish <bjan+public@bjan.net> http://bjan.net