Change time updatedb is run

Gary Hodges fsunoles at gmail.com
Wed Jan 18 16:24:30 UTC 2006


On 1/18/06, albi <albi at scii.nl> wrote:
> 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

I assumed it followed the same format as crontab which doesn't make
sense now that I look at the weekly entry.  If a machine is running
24/7, then when would it be run?  Maybe I'll move the parts that run
updatedb from cron.daily and make a separate job for them with
crontab.




More information about the ubuntu-users mailing list