syntax
crontab [-u user] file
crontab [-l | -r | -e ]
-l list crontab
-r removes crontab
-e edits crontab using $EDITOR
controlling access to cron
restrict / allow user access to cron
/etc/cron.allow
/etc/cron.deny
system crontab files
different format than user crontab files
master crontab file /etc/crontab runs executables in
/etc/cron.hourly
/etc/cron.daily
/etc/cron.weekly
/etc/cron.monthly
/etc/cron.d/ directory contains additoonal system crontab files
daily cron jobs
tmpwatch
cleans old files in specific directories
keeps /tmp from filling up
logrotate
keeps log files from getting to large
highly configurable in /etc/logrotate.conf
logwatch
provides a summary about system activity
reports suspicious messages
configuration file:/etc/log.d/conf/logwatch.conf
The anacron system
anacron runs cron jobs that did not run when the computer is down
assumes computers are not up continually
vital for laptops,desktops,workstations,and other systems that are not up continually
useful for servers that need to be taken down temporarily
configuration file :/etc/anacrontab
field 1: if the job has not been run in this many days
field 2: wait this number of minutes after reboot and then run it
field 3: job identifier
field 4: the job to run
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/312079/viewspace-1003550/ ,如需转载,请注明出处,否则将追究法律责任。