| 位置 | /etc/crontab、/etc/cron.d/、/etc/cron.*/ |
|---|---|
| 机制 | run-parts 执行目录内可执行脚本 |
清点
清点
grep -v '^#' /etc/crontab | grep -v '^$'
ls -la /etc/cron.d/ /etc/cron.daily/ /etc/cron.hourly/cron.daily 等目录里的脚本以 root 运行,新增脚本容易被当作正常运维任务忽略。
系统级计划任务分散在 /etc/crontab、/etc/cron.d/、/etc/cron.{hourly,daily,weekly,monthly}/ 与 /etc/anacrontab,逐处核对才完整。
| 位置 | /etc/crontab、/etc/cron.d/、/etc/cron.*/ |
|---|---|
| 机制 | run-parts 执行目录内可执行脚本 |
grep -v '^#' /etc/crontab | grep -v '^$'
ls -la /etc/cron.d/ /etc/cron.daily/ /etc/cron.hourly/