Question of How to Set up a Crontab to Automatically Archive the Reports



We installed piwik inside Linux machine, reading the section

and then add the lines:
5 * * * * www-data /usr/bin/php5 /path/to/piwik/console core:archive --url= > /home/example/piwik-archive.log

The log redirection is a simple redirection (overwrite existing logs inside /home/example/piwik-archive.log).
Should not be used the double redirection ">> to not overwrite log files?
Like as:
/usr/bin/php5 /path/to/piwik/console core:archive --url= >> /home/example/piwik-archive.log

(Simple redirections)

Cesar Jorge

(Matthieu Aubry) #2

It’s good idea to use >> instead of > :+1: - we prefer to leave > in the documentation for now, to not create a “huge” file in case user do not rotate the log