I'm currently tinkering with anacron 2.3 on a Ubuntu 12.04 (Precise) installation. I have been trying to make use of the START_HOURS_RANGE and RANDOM_DELAY env vars. My /etc/anacrontab looks like this:
# /etc/anacrontab: configuration file for anacron # See anacron(8) and anacrontab(5) for details. SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin START_HOURS_RANGE=3-5 RANDOM_DELAY=30 # These replace cron's entries 1 5 cron.daily nice run-parts --report /etc/cron.daily 7 10 cron.weekly nice run-parts --report /etc/cron.weekly @monthly 15 cron.monthly nice run-parts --report /etc/cron.monthly 1 0 test.job echo 'TEST JOB'
The thing is, when I manually run anacron using
sudo anacron -s
The test job is executed immediately, even though I'm outside the start time range and there is a random delay associated.
I don't know what else to do to reproduce the behaviour described in the manpage for anacrontab(5)
I already thank you for any help that you could give me.
Nicolás Carrasco Stevenson