[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Anacron schedule



Judith Elaine Bush wrote:
> 
> 
> I've edited /etc/crontab to change the time (ana)cron runs its daily,
> weekly, and monthly scripts. They still seem to run after 7 am and not
> at 5:25. The system has been rebooted since the crontab change (not my
> fault!), so any and all daemons have been restrted since the change.
> 
> I am a little confused about the structure of the crontab command that
> refers to the daily, weekly, and monthly cron schedules. Since anacron
> is installed on my system, 'test -e /usr/sbin/anacron' returns
> 0. Thus, since the second command only runs IFF the first command
> returns a non-zero status, it seems that these crontab entries don't
> trigger anacron or the run-parts. (And then the
> /etc/cron[daily|monthly|weekly] all have 0anacron scripts that seem to
> run run-parts on the self directory.
> 
> Between my change making no difference and closely examining the
> crontab entries, I am now left puzzled where anacron is scheduled to
> run when the system is up for over 24 hours.

	The cron daemon uses the files  in /etc/cron.d as an extension of 
/etc/crontab. So /etc/cron.d/anacron runs /usr/sbin/anacron -s
	Then> anacron -s  runs the jobs in /etc/anacrontab which has the
 run-parts that replace cron's entries for daily, weekly and monthly.
	The anacrontab entries specify a period in days and a delay in
minutes that anacron checks before it runs the job e.g.:

1   5   cron.daily nice run-parts --report /etc/cron.daily

   	Anacron records the date, not the hour in its timestamp, so it
knows when to execute again.
-- 
LINUX~~nobody owns it~~everybody can use it~~anybody can improve it
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



Reply to: