ITPub博客

首页 > 应用开发 > IT综合 > cron相关

cron相关

原创 IT综合 作者:tonykorn97 时间:2008-05-07 18:34:14 0 删除 编辑


syntax
crontab [-u user] file
crontab [-l | -r | -e ]
-l list crontab
-r removes crontab
-e edits crontab using $EDITOR

[@more@]


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/ ,如需转载,请注明出处,否则将追究法律责任。

下一篇: tmpwatch命令详解
请登录后发表评论 登录
全部评论

注册时间:2007-12-05

  • 博文量
    1854
  • 访问量
    2088436