Crontab Archiving not working after upgrade

When running manually the command for test I receive this;

cosmic@trace:~$ sudo /usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/"
INFO [2019-06-06 13:17:26] 24495  ---------------------------
INFO [2019-06-06 13:17:26] 24495  INIT
INFO [2019-06-06 13:17:26] 24495  Running Matomo 3.10.0-b3 as Super User
INFO [2019-06-06 13:17:26] 24495  ---------------------------
INFO [2019-06-06 13:17:26] 24495  NOTES
INFO [2019-06-06 13:17:26] 24495  - If you execute this script at least once per hour (or more often) in a crontab, you may disable 'Browser trigger archiving' in Matomo UI > Settings > General Settings.
INFO [2019-06-06 13:17:26] 24495    See the doc at: https://matomo.org/docs/setup-auto-archiving/
INFO [2019-06-06 13:17:26] 24495  - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings.
INFO [2019-06-06 13:17:26] 24495  - Reports for the current week/month/year will be requested at most every 3600 seconds.
INFO [2019-06-06 13:17:26] 24495  - Archiving was last executed without error 12 min 12s ago
INFO [2019-06-06 13:17:26] 24495  ---------------------------
INFO [2019-06-06 13:17:26] 24495  START
INFO [2019-06-06 13:17:26] 24495  Starting Matomo reports archiving...
INFO [2019-06-06 13:17:27] 24495  - no new tracking data for website id 1 since 2019-06-06 13:05:14 UTC (since the last successful archiving)
INFO [2019-06-06 13:17:27] 24495  Skipped website id 1 as archiving is not needed
INFO [2019-06-06 13:17:27] 24495  - tracking data found for website id 2 since 2019-06-06 13:05:14 UTC (since the last successful archiving)
INFO [2019-06-06 13:17:27] 24495  Skipped website id 2, already done 12 min 24s ago, Time elapsed: 0.003s
INFO [2019-06-06 13:17:27] 24495  - no new tracking data for website id 3 since 2019-06-06 13:05:14 UTC (since the last successful archiving)
INFO [2019-06-06 13:17:27] 24495  Skipped website id 3 as archiving is not needed
INFO [2019-06-06 13:17:27] 24495  - no new tracking data for website id 4 since 2019-06-06 13:05:14 UTC (since the last successful archiving)
INFO [2019-06-06 13:17:27] 24495  Skipped website id 4 as archiving is not needed
INFO [2019-06-06 13:17:27] 24495  Done archiving!
INFO [2019-06-06 13:17:27] 24495  ---------------------------
INFO [2019-06-06 13:17:27] 24495  SUMMARY
INFO [2019-06-06 13:17:27] 24495  Total visits for today across archived websites: 0
INFO [2019-06-06 13:17:27] 24495  Archived today's reports for 0 websites
INFO [2019-06-06 13:17:27] 24495  Archived week/month/year for 0 websites
INFO [2019-06-06 13:17:27] 24495  Skipped 4 websites
INFO [2019-06-06 13:17:27] 24495  - 3 skipped because no new visit since the last script execution
INFO [2019-06-06 13:17:27] 24495  - 1 skipped because existing daily reports are less than 900 seconds old
INFO [2019-06-06 13:17:27] 24495  - 0 skipped because existing week/month/year periods reports are less than 3600 seconds old
INFO [2019-06-06 13:17:27] 24495  Total API requests: 0
INFO [2019-06-06 13:17:27] 24495  done: 0/4 0%, 0 vtoday, 0 wtoday, 0 wperiods, 0 req, 343 ms, no error
INFO [2019-06-06 13:17:27] 24495  Time elapsed: 0.343s
INFO [2019-06-06 13:17:27] 24495  ---------------------------
INFO [2019-06-06 13:17:27] 24495  SCHEDULED TASKS
INFO [2019-06-06 13:17:27] 24495  Starting Scheduled tasks... 
INFO [2019-06-06 13:17:27] 24495  done
INFO [2019-06-06 13:17:27] 24495  ---------------------------

Now when I run these commands:

cosmic@trace:/etc/cron.d$ sudo crontab -u www-data -e

MAILTO="cosmin@uhlhost.net"
5 * * * * /usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /var/log/matomo/matomo-archive.log

cosmic@trace:/etc/cron.d$ grep 'CRON'.*\(www-data\) /var/log/syslog
Jun  6 07:05:01 trace CRON[15986]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 08:05:01 trace CRON[16944]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 09:05:01 trace CRON[18058]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 10:05:01 trace CRON[19394]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 11:05:01 trace CRON[20203]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 12:05:01 trace CRON[21404]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
Jun  6 13:05:01 trace CRON[22816]: (www-data) CMD (/usr/bin/php /var/www/html/matomo/console core:archive --url="https://trace.uhlhosting.ch/" > /dev/null)
cosmic@trace:/etc/cron.d$ 

I have added logging to latest crontab edit, since was hopping to find more details why is reported in admin UI like:

Well, the archiving reports that you have no new visits, since the last archiving. No errors in sight.

For the message in the admin UI: Do you have disabled browser archiving? It will only check your cron archiving if the browser archiving is disabled.

1 Like

Thanks for reply! It seems the Browser archiving was On after upgrade, this caused all the confusion. Now all stats are back green, will keep count of such in future.

1 Like