Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

explogrotate.php cronjob

Logs: rotate the logs over their MaxSize, prune and compress their archives (off unless a part runs it).

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/examples/cronjobs/explogrotate.md

On this page

The explogrotate.php cronjob

Logs: rotate the logs over their MaxSize, prune and compress their archives (off unless a part runs it).

Entry point cronjobs/explogrotate.php, code in kernel/private/classes/cronjobs/explogrotate.php.

The code of cronjobs/explogrotate.php: the log rotation cronjob part ([CronjobPart-logs], in no default part, so it
runs only when a site adds it to a part it runs or calls php runcronjobs.php logs). Guide:
doc/eng-us/features/6.0/log-rotation.md, "As a cronjob part".

Each run, through expLogManager: rotates every log over its MaxSize (logviewer.ini [RotationSettings] MaxSize[<key>],
else site.ini [FileSettings] LogFileMaxSize), prunes the archives beyond Keep and MaxAgeDays, and compresses the plain
archives from .2 on of the logs whose Compress is enabled. Every change is recorded in the audit trail.

When it runs

In the shipped settings/cronjob.ini it belongs to: the part logs.

# run its part (as the user the web server runs as, from the installation root)
php runcronjobs.php logs
./console exp:runcronjobs logs
# run only this script
php runcronjobs.php explogrotate

Add it to a part in an override:

<?php /* #?ini charset="utf-8"?
# settings/override/cronjob.ini.append.php
[CronjobPart-logs]
Scripts[]=explogrotate.php
*/ ?>

Generated by ./console exp:help:examples from cronjobs/explogrotate.php, kernel/private/classes/cronjobs/explogrotate.php, settings/cronjob.ini. Do not edit this page: change the source and generate again (how). Free documentation: GFDL 1.3 or later.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x