On Sun, Jan 24, 2010 at 3:15 PM, Ted Unangst <ted.unan...@gmail.com> wrote: > On Sun, Jan 24, 2010 at 3:00 PM, Antoine Jacoutot <ajacou...@bsdfrog.org> > wrote: >> On Sun, 24 Jan 2010, Ted Unangst wrote:
>> sysutils/anacron > > Right, but I think this is something base should handle more > gracefully. The locate database is part of the OS, therefore the OS > should take the necessary steps to maintain it. > > Drawbacks of anacron: > 1. GPL. Can't import in base. > 2. Doesn't run things at a set time. You probably don't want weekly > running when you're actually using the system. 'runwhen' is very good: http://code.dogmap.org/runwhen/ , but <sigh> it's GPL v.2, and the author is anal-retentive about distribution of modified versions. It probably has no chances of being in the base, but it is hopeful someone here could learn from its design and other tools from code.dogmap.org and related sites. Or maybe rewrite it under the BSD license... Yeah right! I wish I could, but again I am not a C or system hacker. Excerpt from http://code.dogmap.org/runwhen/overview/ "But actually, there are some things runwhen does that at doesn't. You can interrupt its sleep and execute the job early by sending SIGALRM. You can have it wait indefinitely until SIGALRM. For cron-like jobs that run repeatedly, you can place an upper bound on the amount of time between runs, in case the system was off during the last scheduled run time, like anacron. If a job takes longer to run than the period between scheduled run times, then you can control on a per-job basis whether to wait for the previous run to finish or to run multiple instances concurrently. You can schedule as many jobs as you like, up to the kernel's maximum number of processes, instead of an arbitrary limit compiled into the scheduler. You can develop and use your own tools to modify the sleep duration, based on criteria I haven't thought of." An example of a 'runwhen' script: http://code.dogmap.org/runwhen/example/ No, you don't need 'daemontools' to run it, you can use 'runit' http://smarden.org/runit , It's under a BSD-like license, but <sigh> you guys probably have an aversion to the design as well since it's related to the 'daemontools' design... You can use 'runwhen' one-time jobs without 'daemontools' or 'runit'. 'sysutils/runit' is in ports. It's daemontools-compatible and more feature-rich. Other smarden.org tools are great too - socklog (also in ports) for example. It's <really, what a surprise!> MUCH better than syslog.