• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

Logratote Uhrzeit falsch

matthiasn

Newbie
Hallo zusammen,


ich habe ein Problem mit logrotate unter SLES 11.
Logrotate soll täglich um Mitternacht Logfiles rollen, tut dies aber immer vormittags um ca 09.33.
Ein Eintrag in der Crontab 59 23 * * * /usr/sbin/logrotate -f /etc/logrotate.d/syslog 2>&1 >/dev/null behebt dieses Problem leider nicht.

Wie ist die Lösung?

Grüße und besten Dank für die Hilfe.
 

RME

Advanced Hacker
Hallo,

/etc/crontab >>> /usr/lib/cron/run-crons >>> /etc/cron.daily/logrotate

Letzteres liest die Variable:

DAILY_TIME

spezifiziert in:

/etc/sysconfig/cron

cron schrieb:
## Type: string
## Default: ""
#
# At which time cron.daily should start. Default is 15 minutes after booting
# the system. Example setting would be "14:00".
# Due to the fact that cron script runs only every 15 minutes,
# it will only run on xx:00, xx:15, xx:30, xx:45, not at the accurate time
# you set.
DAILY_TIME=""

Gruss,
Roland
 
Oben