Linux的计划任务
进行登录文件的数据轮替 ( log rotate ):
rpm 数据库的建立:
建立 locate 的数据库:
进行程序的分析:
登录档视察:
指纹数据库的比对:

at命令:添加一个时间执行一个任务
at:    安排任务
atq:   查看任务
atrm [job id]: 删除任务
batch:  以一个低优先级延时任务(CPU<80%)
/var/spool/at
/etc/at.allow  //与访问控制列表相似
/etc/at.deny

/etc/init.d/atd restart 开启服务
chkconfig --level 2345 atd on让ATD自动开启

     at now +1 min
at>echo "hello" (没重定向时,以邮件方式发送给用户)
 
     at 00:55 2008-11-18
at>/sbin/shutdown -h now(使用绝对路径)

cron机制:
/etc/cron.allow  //与访问控制列表相似
/etc/cron.deny
/etc/init.d/crond restart 开启服务
crontab -u -e -l -r
*任何时刻(容易出错)
,分隔时段
-一段时间
/n每个n单位间隔
指令型态 
     01 * * * * dmtsai mail -s "testing" kiki < /home/dmtsai/test.txt以 dmtsai 这个使用者的身份,在每小时执行一次 mail 指令。 
目录规划 
     */5 * * * * root run-parts /root/runcron建立一个 /root/runcron 的目录,将要每隔五分钟执行的『可执行档』都写到该目录下, 就可以让系统每五分钟执行一次该目录下的所有可执行档。

[root@linux ~]# vi /etc/crontab  (要有使用者)
1,6,11,16,21,26,31,36,41,46,51,56 * * * * root  CMD1 
2,7,12,17,22,27,32,37,42,47,52,57 * * * * root  CMD2 
3,8,13,18,23,28,33,38,43,48,53,58 * * * * root  CMD3 
4,9,14,19,24,29,34,39,44,49,54,59 * * * * root  CMD4