今天我意识到我的服务器上没有运行一些 cron 任务!在日志文件中我发现了以下内容:
Mar 13 03:30:01 osp-server anacron[7261]: Anacron 2.3 started on 2012-03-13
Mar 13 03:30:01 osp-server anacron[7261]: Will run job `logprepare' in 1 min.
Mar 13 03:30:01 osp-server anacron[7261]: Will run job `cron.daily' in 5 min.
Mar 13 03:30:01 osp-server anacron[7261]: Jobs will be executed sequentially
Mar 13 03:31:01 osp-server anacron[7261]: Job `logprepare' started
Mar 13 03:31:01 osp-server anacron[7261]: Job `logprepare' terminated
Mar 13 03:35:01 osp-server anacron[7261]: Job `cron.daily' started
Mar 13 03:35:01 osp-server anacron[7832]: Updated timestamp for job `cron.daily' to 2012-03-13
Mar 14 03:25:01 osp-server CRON[28589]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar 14 03:30:01 osp-server CRON[29167]: (root) CMD (start -q anacron || :)
Mar 15 03:25:01 osp-server CRON[930]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar 15 03:30:01 osp-server CRON[1509]: (root) CMD (start -q anacron || :)
Mar 16 03:25:01 osp-server CRON[5599]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar 16 03:30:01 osp-server CRON[6177]: (root) CMD (start -q anacron || :)
Mar 17 03:25:01 osp-server CRON[10131]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
[...]
Mar 25 03:30:01 osp-server CRON[10406]: (root) CMD (start -q anacron || :)
Mar 25 03:47:01 osp-server CRON[12607]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly ))
Mar 26 03:25:01 osp-server CRON[13760]: (root) CMD (test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily ))
Mar 26 03:30:01 osp-server CRON[14335]: (root) CMD (start -q anacron || :)
Mar 26 20:21:30 osp-server anacron[7261]: Job `cron.daily' terminated (mailing output)
我理解的对吗?/etc/cron/cron.daily 中的一项任务直到 3 月 26 日 20:21:30 才完成,因此没有运行其他 cronjobs?
如果是,我该如何结束这种行为?例如,如果任务在 2 小时内未完成,是否会自动终止?
提前致谢