Change time updatedb is run

albi albi at scii.nl
Wed Jan 18 16:06:50 UTC 2006


Gary Hodges wrote:

> I'd like to change the time updatedb is run.  I've figured out it is
> run from a cron.daily entry and further investigation reveals the
> following file:
> 
> ---------------------
> /etc>more anacrontab
> # /etc/anacrontab: configuration file for anacron
> 
> # See anacron(8) and anacrontab(5) for details.
> 
> SHELL=/bin/sh
> PATH=/sbin:/bin:/usr/sbin:/usr/bin
> 
> # These replace cron's entries
> 1       5       cron.daily       nice run-parts --report /etc/cron.daily
> 7       10      cron.weekly      nice run-parts --report /etc/cron.weekly
> @monthly        15      cron.monthly nice run-parts --report /etc/cron.monthly
> ----------------------
> 
> It looks like cron.daily is run daily at one minute past 5:00 AM.  Can
> I edit this file so that it runs an hour (or two) earlier or will
> changing the time cause problems with other programs?

man ancrontab :

------------------------ begin quote manpage anacrontab ---
       The file /etc/anacrontab describes the jobs controlled by
anacron(8).  Its lines can be of
       three kinds:  job-description lines, environment assignments, or
empty lines.

       Job-description lines are of one of these two forms:

          period  delay  job-identifier  command

          @period_name delay job-identify command

       The period is specified in days, the delay in minutes.

-------------------------- end quote manpage anacrontab ---

so i think that cron.daily will be run every day 5 minutes after you
boot up your machine, correct me if i'm wrong

for daily tasks at a certain time i personally prefer to use cron
instead of anacron

see :  man 5 crontab

-- 
grtjs, albi
gpg-key: lynx -dump http://scii.nl/~albi/gpg.asc | gpg --import




More information about the ubuntu-users mailing list