Red Hat Bugzilla – Bug 887859
Incorrect example in anacrontab manpage
Last modified: 2013-11-21 17:24:29 EST
Description of problem: Example in anacrontab doesn't have set "delay" for daily jobs, but it's mentioned in comment above. See bellow. Version-Release number of selected component (if applicable): cronie-1.4.4-7.el6 Steps to Reproduce: 1. man anacrontab 2. go to EXAMPLE section Actual results: RANDOM_DELAY=30 # Anacron jobs will start between 6 and 8 o’clock. START_HOURS_RANGE=6-8 # delay will be 5 minutes + RANDOM_DELAY for cron.daily 1 0 cron.daily nice run-parts /etc/cron.daily 7 0 cron.weekly nice run-parts /etc/cron.weekly Expected results: (delay is set to 5 minutes for cron.daily) RANDOM_DELAY=30 # Anacron jobs will start between 6 and 8 o’clock. START_HOURS_RANGE=6-8 # delay will be 5 minutes + RANDOM_DELAY for cron.daily 1 5 cron.daily nice run-parts /etc/cron.daily 7 0 cron.weekly nice run-parts /etc/cron.weekly
[root@ibm-p730-04-lp4 ~]# rpm -q cronie-anacron && man -P cat anacrontab | iconv -f utf-8 -t ASCII -c | grep -A 17 EX cronie-anacron-1.4.4-7.el6.ppc64 EXAMPLE This example shows how to set up the behaviour similar to previous set- ting in /etc/crontab which will start all regular jobs only between 6:00 and 8:00. There is added RANDOM_DELAY which will be maximally 30 minutes. Jobs will be running in queue. After one finish, then next will start. # environment variables SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root RANDOM_DELAY=30 # Anacron jobs will start between 6 and 8 oclock. START_HOURS_RANGE=6-8 # delay will be 5 minutes + RANDOM_DELAY for cron.daily 1 0 cron.daily nice run-parts /etc/cron.daily 7 0 cron.weekly nice run-parts /etc/cron.weekly @monthly 0 cron.monthly [root@ibm-p730-02-lp2 ~]# rpm -q cronie-anacron && man -P cat anacrontab | iconv -f utf-8 -t ASCII -c | grep -A 17 EX cronie-anacron-1.4.4-12.el6.ppc64 EXAMPLE This example shows how to set up the behaviour similar to previous set- ting in /etc/crontab which will start all regular jobs only between 6:00 and 8:00. There is added RANDOM_DELAY which will be maximally 30 minutes. Jobs will be running in queue. After one finish, then next will start. # environment variables SHELL=/bin/sh PATH=/sbin:/bin:/usr/sbin:/usr/bin MAILTO=root RANDOM_DELAY=30 # Anacron jobs will start between 6 and 8 oclock. START_HOURS_RANGE=6-8 # delay will be 5 minutes + RANDOM_DELAY for cron.daily 1 5 cron.daily nice run-parts /etc/cron.daily 7 0 cron.weekly nice run-parts /etc/cron.weekly @monthly 0 cron.monthly nice run-parts /etc/cron.monthly
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2013-1681.html