cron jobs not done during sleep

RW fbsd06 at mlists.homeunix.com
Mon Sep 17 13:23:57 PDT 2007


On Mon, 17 Sep 2007 08:22:45 -0700
"Steve Franks" <stevefranks at ieee.org> wrote:

> Is there a tool or setting to implement this functionality?  I want
> something to happen weekly, I don't care when. 

One way is to install a crontab replacement like fcron, but the easiest
way to handle this is to install anacron, which works in conjunction
with crontab. 

With anacron you need to comment out the three periodic calls
in /etc/crontab so anacron can schedule them itself - it has a
default .conf file to do this. Adding anacron_enable=yes to rc.conf
causes it to run tasks at boot-up. You should also add one or more
entries to crontab to make it run during the night.

00    04     *    *    *    root    /usr/local/sbin/anacron


It's actually not essential to set anacron_enable=yes I just use
crontab to run it several times a day at convenient time.


More information about the freebsd-questions mailing list