A number of packages install shell scripts to the directories /etc/cron.hourly,
/etc/cron.daily, /etc/cron.weekly and /etc/cron.monthly, whose
execution is controlled by /usr/lib/cron/run-crons. /usr/lib/cron/run
-crons is run every 15 minutes from the main table (/etc/crontab). This guaran-
tees that processes that may have been neglected can be run at the proper time.
To run the hourly, daily or other periodic maintenance scripts at custom times,
remove the time stamp les regularly using /etc/crontab entries (see Example 11.2,
“/etc/crontab: Remove Time Stamp Files” (page 195), which removes the hourly one
before every full hour, the daily one once a day at 2:14 a.m., etc.).
Example 11.2:
/etc/crontab: Remove Time Stamp Files
59 * * * * root rm -f /var/spool/cron/lastrun/cron.hourly
14 2 * * * root rm -f /var/spool/cron/lastrun/cron.daily
29 2 * * 6 root rm -f /var/spool/cron/lastrun/cron.weekly
44 2 1 * * root rm -f /var/spool/cron/lastrun/cron.monthly
Or you can set DAILY_TIME in /etc/sysconfig/cron to the time at which
cron.daily should start. The setting of MAX_NOT_RUN ensures that the daily tasks
get triggered to run, even if the user did not turn on the computer at the specied
DAILY_TIME for a longer period of time. The maximum value of MAX_NOT_RUN is
14 days.
The daily system maintenance jobs are distributed to various scripts for reasons of
clarity. They are contained in the package aaa_base. /etc/cron.daily contains,
for example, the components suse.de-backup-rpmdb, suse.de-clean-tmp
or suse.de-cron-local.
11.1.3 Log Files: Package logrotate
There are a number of system services (daemons) that, along with the kernel itself,
regularly record the system status and specic events onto log les. This way, the ad-
ministrator can regularly check the status of the system at a certain point in time, recog-
nize errors or faulty functions and troubleshoot them with pinpoint precision. These
log les are normally stored in /var/log as specied by FHS and grow on a daily
basis. The logrotate package helps control the growth of these les.
Congure logrotate with the le /etc/logrotate.conf. In particular, the
include specication primarily congures the additional les to read. Programs that
Special System Features 195