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

Re: rotating log files



The problem wasn't what I thought it was..:-)

Most of my PCs are turned on when necessary and turned off
when not.  The default Debian setup is to do run-parts
/etc/cron.daily in the morning (6:42am), but my PCs are most
likely to be turned off at that time.  So no rotations are
done.  (I can change the time to day time, but still
there'll be no guarantee that the PCs will be up at that
time.)

Although I cannot confirm this anymore, it appears to be the
case when I was running Debian 1.2 or 1.3 that when I turned
on the PC, it somehow knew that it had to do run-parts
/etc/cron.daily and would do so.  Maybe it was a result of
some misconfiguration, but the important this to me was that
the log files were rotated when I turned on the PC.  Now I
have Debian 2.0 on all my PCs and this no longer happens.

So the question is, has there been a change in either
/usr/sbin/cron or /etc/init.d/cron ?

If there had never been such a feature (and I was getting it
because of some misconfiguration:-)), I think it would be a
nice feature to add to /etc/init.d/cron.  Have some files to
keep track of when /etc/cron.{daily,weekly,monthly} last ran
(touch /etc/cron.daily-lastrun should be sufficient), and
/etc/init.d/cron (on start) can check the timestamps to see
whether it should run them directly.

Fumi Okushi


Reply to: