#619648 cron.daily doesn't execute scheduled scripts

Package:
anacron
Source:
anacron
Description:
cron-like program that doesn't go by time
Submitter:
Roy Jamison
Date:
2024-03-22 14:45:03 UTC
Severity:
normal
Tags:
#619648#5
Date:
2011-03-25 19:53:39 UTC
From:
To:
package: anacron
version: 2.3-13.1

This bug was originally filed in Launchpad at
https://bugs.launchpad.net/ubuntu/+source/anacron/+bug/382315

"In my system (Hardy) the cron.daily scripts (etc/cron.daily/*) seems
not to be daily executed.

This is my /etc/crontab
SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts
--report /etc/cron.monthly )
#

This is my /etc/anacrontab

SHELL=/bin/sh
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

# 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

In /var/log/syslog I correctly see
Apr 30 08:37:22 ramses anacron[6700]: Job `cron.daily' started
Apr 30 08:37:22 ramses anacron[7737]: Updated timestamp for job
`cron.daily' to 2009-04-30

but nothing seems having been executed.

If I manually launch
run-parts --report /etc/cron.daily
the scripts are correctly executed."

The Launchpad bug has been confirmed in anacron version 2.3-13.1 (Ubuntu
10.04).

#619648#12
Date:
2024-03-22 13:01:20 UTC
From:
To:
Dear Maintainer,

I can reproduce this issue. While scripts in my personal crontab that are run
by cron are executed fine, the ones owned by anacron don't seem to be executed
although the syslog suggests otherwise.

For example, a line starting with @daily does not work (i.e. run by anacron)
but when changing it to @hourly it does -- this time cron seems to take over.


Cheers,

Bastian

#619648#17
Date:
2024-03-22 14:33:58 UTC
From:
To:
Control: tags 1053873 + moreinfo

If you could provide your anacrontab and logs, it would be helpful.

Anacron only supports the @monthly period_name at this time [1], so I
would not expect it behave well with @daily or @hourly. It would be a
nice feature to add @daily and @weekly to Anacron though.

[1] https://manpages.debian.org/unstable/anacron/anacrontab.5.en.html