Comment 9 for bug 38022

Revision history for this message
Chris Vigelius (chris-vigelius) wrote : Re: cron (run-parts) doesn't run script with sh extension

a quick look into /etc/crontab shows that this issue still exists at least in 9.10:

cat /etc/crontab
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )

You can confirm this by executing run-parts --test /etc/cron.daily - this will show which programs would be executed without actually executing them.

To actually fix this problem, it would be necessary to add --regex='.*' to the respective run-parts calls in /etc/crontab. Simply having the --regex option is not sufficient when it is not actually used. See attached patch for details (which also fixes the same problem with /etc/anacrontab to avoid inconsistencies.

p.s. a similar problem exists with cron.d, which is *not* addressed by this patch. The solution is probably the same as given here, unfortunately I do not know where the cron.d entries are executed from.