Auto-archiving is in use since forever and updated with 2.2.0 to use “console core:archive”.
Here’s my Cron job:
*/15 * * * * /bin/php /stats/piwik/console core:archive --url=http://123.45.6.7 >> /logs/piwik-console-cron.log
What I still don’t get is what is needed so “weeks” will always be generated.
In Settings => General Settings : Reports for today (or any other Date Range including today) will be processed at most every 600 seconds.
But the log (piwik-console-cron.log) still has these:
This one ran at 15:45:
Reports for today will be processed at most every 600 seconds. You can change this value in Piwik UI > Settings > General Settings.
Reports for the current week/month/year will be refreshed at most every 3600 seconds.
Archiving was last executed without error 14 min 39s ago
Will process 4 websites with new visits since 14 min 39s , IDs: 2, 4, 5, 6
But I had to browse in Piwik to “force” the week report to exist and finally got for siteId 6:
This one ran at 16:00
Archived website id = 6, period = day, 6623 visits in last 2 days, 1468 visits today, Time elapsed: 3.870s
Archived website id = 6, period = week, 47986 visits in last 2 weeks, 18573 visits this week, Time elapsed: 14.524s
Archived website id = 6, period = month, 211375 visits in last 2 months, 120917 visits this month, Time elapsed: 156.969s
Archived website id = 6, period = year, 976016 visits in last 2 years, 573182 visits this year, Time elapsed: 99.498s
Archived website id = 6, 4 API requests, Time elapsed: 274.866s [4/6 done]
I am missing something somewhere… I want my stats fresh and I don’t want to depend on human browsing Piwik to have stuff up-to-date.
Dali