[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cron not updating -> errors



Santiago Garcia Mantinan <manty@i.am> writes:

> Hi!
> 
> I suppose this is the usual behaviour of cron (running 3.0pl1-57 now), but
> it has shocked me.
> 
> The thing is that if I remove a package that has a /etc/cron.d entry when
> there is less than one minute left for the run of the programs of this
> package, cron tries to execute them even though dpkg had removed the
> /etc/cron.d entry several seconds before. This leads to a typical file not
> found mail going to the administrator.
> 
> In my case the package was some scripts and one of them is run each minute,
> so 100% of the times you do a dpkg -r of this package you get the mail. So
> far the only solution that I have came up with for this was a post remove
> script to stop and then start again cron, but this doesn't seem at all a
> clean solution.
> 
If /etc/cron.d/package_name were a conffile, it wouldn't be removed by
dpkg-r, right? And if this script checked if the pacakage is installed
and do a 'exit 0' otherwise, it would fix this, right?

Andy
-- 
Andreas Rottmann (Dru@ICQ, 54523380@ICQ)
Pfeilgasse 4-6/725, A-1080 Wien, Austria, Europe
http://www.penguinpowered.com/~andy/
mailto:a.rottmann@gmx.at
[one of 78,35% Austrians who didn´t vote for Haider!]


Reply to: