proposal: best practices for cron jobs in RPM packages

Miloslav Trmac mitr at volny.cz
Thu Jun 10 23:49:41 UTC 2004


On Thu, Jun 10, 2004 at 12:32:54PM -0700, Florin Andrei wrote:
> Better yet, the %postinstall RPM macro could go ahead and fill up upon
> install a random 0...59 value for the minutes field and a random 0...23
> value for the hour field, this way making things a lot easier for the
> ClamAV database servers.
Or the cron %postinstall could do it, which will get you the same
improvement (and because it is at one place, it is easier to fix potential
script bugs, like running twice when the time zone changes to DST, which
could happen if you chose a completely random hour).

> In fact, /etc/cron.d seems to be the ideal spot to stick cron jobs for
> RPM packages. There are very few applications that need cron jobs to be
> run exactly once a day/week/month in every conceivable situation, and
> most of those are actually within tightly interlocked sequences such as:
> run logwatch/webalizer first, then anacron, then finally logrotate.
/etc/cron.d can not be integrated with anacron, which is quite a problem
for most "ordinary users" who switch their computers off in the evening.
	Mirek





More information about the fedora-devel-list mailing list