Change time updatedb is run

Gary Hodges fsunoles at
Fri Jan 27 20:34:52 UTC 2006

On 1/26/06, Bill Marcum <bmarcum at> wrote:
> On Wed, 18 Jan 2006 13:15:19 -0400, Derek Broughton
>   <news at> wrote:
> >
> > anacron won't run at all if you're running 24/7.  It gets kicked off at boot
> > time, and determines when it will run the jobs that cron _should have run_
> > while it was powered down.  Once it's run everything in its schedule,
> > anacron stops.
> >
> If your machine runs 24/7, anacron runs at the time set in
> /etc/cron.d/anacron.  The files in /etc/cron.d use the /etc/crontab
> format, where the sixth column is the username.

Thanks for you reply.  I was looking at this again yesterday and
noticed the /etc/crontab file.

~>more /etc/crontab
# /etc/crontab: system-wide crontab
# Unlike any other crontab you don't have to run the `crontab'
# command to install the new version when you edit this file.
# This file also has a username field, that none of the other crontabs do.


# m h dom mon dow user  command
17 *    * * *   root    run-parts --report /etc/cron.hourly
25 5     * * *   root    test -x /usr/sbin/anacron || run-parts
--report /etc/cron.daily
47 6    * * 7   root    test -x /usr/sbin/anacron || run-parts
--report /etc/cron.weekly
52 6    1 * *   root    test -x /usr/sbin/anacron || run-parts
--report /etc/cron.monthly

I tried changing the time on the cron.daily line to an hour earlier
(it was at hour 6), but when I came in today updatedb was chugging
along.  Experience says it should have stopped had it started an hour
earlier.  I may be repeating the obvious, but what I gather from your
post is I need to change the the file /etc/cron.d/anacron so that
anacron starts an hour ealier.

~>more /etc/cron.d/anacron
# /etc/cron.d/anacron: crontab entries for the anacron package


30 7    * * *   root    test -x /etc/init.d/anacron &&
/usr/sbin/invoke-rc.d anacron start >/dev/null

E.g., change that to 6 from 7, right?


More information about the ubuntu-users mailing list