I have a relatively small Matomo install running on the same system as our web server. Everything works well, except that the archive process refuses to update stats when run via cron, whereas it will run perfectly when run manually.
I have a stock install of Matomo 5.5.1 with the following cron job:
5 * * * * /usr/bin/php8.3 /var/www/matomo/console core:archive --url={site domain}/ >> /var/www/matomo-archive.log
When I run the job at the command-line as the ‘www-data’ user (which is the crontab containing the job above) using the exact definition, copied and pasted to my shell prompt, I get updated statistics and everything works normally. When I allow cron to run the archive process, I get the below in the log file:
INFO [2025-10-30 18:05:01] 1672115 ---------------------------
INFO [2025-10-30 18:05:01] 1672115 INIT
INFO [2025-10-30 18:05:01] 1672115 Running Matomo 5.5.1 as Super User
INFO [2025-10-30 18:05:01] 1672115 ---------------------------
INFO [2025-10-30 18:05:01] 1672115 NOTES
INFO [2025-10-30 18:05:01] 1672115 - Async process archiving supported, using CliMulti.
INFO [2025-10-30 18:05:01] 1672115 - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings.
INFO [2025-10-30 18:05:01] 1672115 - Archiving was last executed without error 59 min 59s ago.
INFO [2025-10-30 18:05:02] 1672115 - Continuing ongoing archiving run by pulling from shared idSite queue.
INFO [2025-10-30 18:05:02] 1672115 ---------------------------
INFO [2025-10-30 18:05:02] 1672115 START
INFO [2025-10-30 18:05:02] 1672115 Starting Matomo reports archiving…
INFO [2025-10-30 18:05:02] 1672115 Archiving will stop now because 4 archivers are already running and max 3 are supposed to run at once.
INFO [2025-10-30 18:05:02] 1672115 Reached maximum concurrent archivers allowed (3), aborting run.
INFO [2025-10-30 18:05:02] 1672115 ---------------------------
INFO [2025-10-30 18:05:02] 1672115 SCHEDULED TASKS
INFO [2025-10-30 18:05:02] 1672115 Starting Scheduled tasks…
INFO [2025-10-30 18:05:02] 1672115 Scheduler: executing task Piwik\Plugins\CustomJsTracker\Tasks.updateTracker…
INFO [2025-10-30 18:05:02] 1672115 Scheduler: finished. Time elapsed: 0.020s
INFO [2025-10-30 18:05:02] 1672115 done
INFO [2025-10-30 18:05:02] 1672115 ---------------------------
06s
INFO [2025-10-30 18:05:02] 1672114 Scheduler: executing task Piwik\Plugins\PrivacyManager\Tasks.anonymizePastData…
INFO [2025-10-30 18:05:02] 1672114 Scheduler: finished. Time elapsed: 0.000s
INFO [2025-10-30 18:05:02] 1672114 done
INFO [2025-10-30 18:05:02] 1672114 ---------------------------
I don’t believe I have any other processes running on this system which interact with the Matomo console in any way, aside from this hourly job. Is there something in my configuration I am missing? Is this a bug? I can’t find anything related to this set of circumstances in the forum or on the greater Internet.
Thanks in advance,
Rob