我有一个脚本,我想在实验室的RHEL 5和6工作站上每晚运行,所以我将脚本部署到每个系统的/etc/cron.day/目录中,并使其在那里可执行。但是在cron.daily运行的时候,一些工作站可能没有接通电源,所以我认为anacron可能更适合这个目的。
如何将这个简单的cron设置转换为使用anacron而不是cron?
看起来/etc/anacrontab已经在/etc/cron.day中运行了脚本:
# /etc/anacrontab: configuration file for anacron
# See anacron(8) and anacrontab(5) for details.
SHELL=/bin/sh
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root
# the maximal random delay added to the base delay of the jobs
RANDOM_DELAY=45
# the jobs will be started during the following hours only
START_HOURS_RANGE=3-22
#period in days delay in minutes job-identifier command
1 5 cron.daily nice run-parts /etc/cron.daily
7 25 cron.weekly nice run-parts /etc/cron.weekly
@monthly 45 cron.monthly nice run-parts /etc/cron.monthly是否需要采取任何步骤来确保工作站以或多或少可靠的方式执行脚本?
https://serverfault.com/questions/551425
复制相似问题