On 01/18/2013 02:36 PM, Thomas Guettler wrote:
> if the pid-file gets lost, and start cronie again, it will run twice:
>
> workdevel114:~ # rm /var/run/cron.pid
> workdevel114:~ # /etc/init.d/cron start
>
> Cronjobs get executed twice:
>
> Jan 18 13:50:15 workdevel114 /usr/sbin/cron[20730]: (CRON) INFO (@reboot
> jobs will be run at computer's startup.)
> Jan 18 13:51:01 workdevel114 /USR/SBIN/CRON[20816]: (modwork_eins_d) CMD
> (. ~/.bashrc && date >> log/date.log)
> Jan 18 13:51:01 workdevel114 /USR/SBIN/CRON[20828]: (modwork_eins_d) CMD
> (. ~/.bashrc && date >> log/date.log)
>
> Version cronie-1.4.7-9.23.1.x86_64 openSUSE 11.4 (x86_64)
>
> I don't know how, but it has happend on one of our servers.
>
> I think this is a bug, since cron should not run twice.
>
> Thomas
>
Fedora has systemd now, so there is problem not reproducible. I tested
the issue on older releases, it's working as you are saying, but I guess
that's the correct behaviour of classical init script. If the pid is
there, then start won't be executed, otherwise daemon will start.
I'm also not sure if you distribution isn't using their own version of
init script, because my pidfile is called crond.pid. You will need to
report it to your distribution if you still believe it's a bug.
Marcela