Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 )
share|improve this question

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.

share|improve this answer

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.

share|improve this answer
    
You can install any mail server you like, not just bsd-mailx. I am pretty sure that you can also edit a config file somewhere to use another mail server, but having one locally means mail won't be lost should the other server be down or unreachable temporarily. – psusi Jan 25 '11 at 14:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.