LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 670|回复: 2

请教两个cron的问题

[复制链接]
发表于 2009-9-22 18:18:21 | 显示全部楼层 |阅读模式
1,默认crontab中没有定义cron.daily,weekly...文件夹,里面的计划任务会执行吗?

2,这一段的作用是.....?
# check scripts in cron.hourly, cron.daily, cron.weekly and cron.monthly
59  *  * * *        root        rm -f /var/spool/cron/lastrun/cron.hourly
9  3  * * *        root        rm -f /var/spool/cron/lastrun/cron.daily
19 4  * * 6        root        rm -f /var/spool/cron/lastrun/cron.weekly
29 5  1 * *        root        rm -f /var/spool/cron/lastrun/cron.monthly
*/10  *  * * *        root        test -x /usr/sbin/run-crons && /usr/sbin/run-crons
发表于 2009-9-22 21:39:18 | 显示全部楼层
1。会
2。http://www.gentoo.org/doc/en/cron-guide.xml
4.  Using cronbase
    *  They will run even if your computer was off when they were scheduled to run
    * It is easy for package maintainers to place scripts in those well defined places
    * You know exactly where your cron-jobs and your crontab are stored, making it easy for you to backup and restore this part of your system
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-23 09:44:59 | 显示全部楼层
Post by wecoh;2029266
1。会
2。http://www.gentoo.org/doc/en/cron-guide.xml


谢谢
第一个问题还有一点不明白,既然不用定义cron.monthly/ cron.weekly/  
cron.daily/   cron.hourly/
那么它们是在什么时间执行的?
--------------------------------------------------------------
srx shom # cat /etc/cron.daily/makewhatis
#!/bin/sh
# this is part of the man package
# it updates the search database for manpages

exec nice makewhatis -u
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表