3

We have a number of scripts setup to run in the /etc/cron.daily directory - some of them show evidence of being run at about the right time (files are archived/compressed and truncated), but others seem to be ignored.

Checking both /var/log/cron.log and /var/log/syslog lists none of the daily jobs - only the hourly (and a couple of 20 minute jobs).

Is there some other log somewhere? The crontab contains these lines:

17 *    * * *   root    cd / && run-parts --report /etc/cron.hourly
25 4    * * *   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 )
Isaiah
  • 60,750
HorusKol
  • 1,607

2 Answers2

3

What are the 20-minute jobs? It looks like you pasted /etc/crontab, and it has no 20-minute entries.

What is the contents of /var/log/cron.log?

Do the permissions on /etc/cron.daily look right? (e.g. should be at least r-x root)

Do the scripts inside /etc/cron.daily have execute permissions?

What does

run-parts --test --report /etc/cron.daily

print?

What happens if you add a new script in that directory that does something trivial that you can verify, e.g.

date >> /tmp/date.out

What does /etc/syslog.conf contain? It should be something like:

cron.*                          -/var/log/cron.log

If it's cron.notice or cron.warn or cron.err rather than cron.*, then not all activity will be logged to /var/log/cron.log.

Mikel
  • 6,615
0

If a cronjob has output or fails, cron will mail the user about it if the bsd-mailx package installed. Read such mails with the mail command.

geirha
  • 47,279