I noticed that logwatch output from 1 of my servers is emailed twice. After giving a deeper look to the thing, I found out that it's not only the logwatch, but all the cron jobs simply run twice.
Yesterday I spend some hours on research, but did not get to an answer yet.
So, in order to avoid answers or assumptions which I already analysed:
No, cron daemon is not running twice (ps ax)
No, I don't have duplicates in /etc/crontab and /var/spool/*
When I run `run-parts /etc/cron.hourly' manually, it runs just once, as expected.
I tried creating a test script in cron.hourly (1echo) and wait for the cron to run. Here's the contents of the `1echo' script:
date >> /var/log/mycron.log
pstree >> /var/log/mycron.log
And here's what I have logged in the `mycron.log' file:
Wed Oct 8 11:01:01 AMT 2014
Wed Oct 8 11:01:01 AMT 2014
init-+-crond---2*[crond---run-parts-+-awk]
| `-run-parts---pstree]
init-+-crond-+-crond---run-parts-+-awk
| | `-run-parts---pstree
| `-crond---run-parts
It's seen from the contents of the log, that the task is run twice at the very same time: first both runs log the date and then the outputs of the pftrees follow.
The /etc/crontab file is the system default, so I do not paste it here.
Thanks!