Log Turnover Problems
C de-Avillez
hggdh2 at ubuntu.com
Fri Nov 5 14:48:57 UTC 2010
On Thu, 04 Nov 2010 21:35:31 -0400
<bizdev at pwnspeak.com> wrote:
<snip/>
> This has never been edited. It still contains the default values for
> cron.daily. How can I make the log's rotate at midnight as expected?
anacron is usually fired from cron. Your '/etc/crontab' should have
entries similar to the following:
# m h dom mon dow user command
17 * * * * root cd / && run-parts --report /etc/cron.hourly
25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )
52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )
So you would need to change the hours and minutes at least for the
cron.daily line (mine, for example, fires off every day at 0625).
Please note that although anacron will be run at the time specified in
the '/etc/crontab', the individual jobs it fires may have other delays,
as set in the '/etc/anacrontab' file.
One more option you can have: add a line to '/etc/crontab' for
logrotate, and set the schedule to what you want.
Cheers,
--
C de-Avillez
IRC: hggdh
This email (and any attachments) is digitally signed using GNUpg
(http://gnupg.org). The public key is available at http://pgp.mit.edu.
The key Id is 0xD3133E56.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20101105/ed11d0ba/attachment.sig>
More information about the ubuntu-users
mailing list