crontab
记录一个今天遇到的坑。在centos 6.3
上的man -5 crontab
的最后部分有这么一句话:
CAVEATS The crontab files have to be regular files or symlinks to regular files, they must not be executable or writable by anyone else than the owner. This requirement can be overridden by using the -p option on the crond command line. If inotify support is in use changes in the symlinked crontabs are not automatically noticed by the cron daemon. The cron daemon must receive a SIGHUP to reload the crontabs. This is a limitation of inotify API.
如果crond在启动时没有加-p: Cron permit any crontab, which user set.
,那么假如在/etc/cron.d下加入一个新的crontab文件,并且它的权限大于0644,那么crond会拒绝启动它。
Comments