@Daijobou opened this Issue on November 16th 2020

I have created a cron /etc/cron.d/ many days ago https://matomo.org/docs/setup-auto-archiving/
5 * * * * user /opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/subdomain.example.com/matomo/console core:archive --url=https://subdomain.example.com/matomo/ > /dev/null

I can test this line with
# su user -s /bin/bash -c "/opt/plesk/php/7.4/bin/php /var/www/vhosts/example.com/subdomain.example.com/matomo/console core:archive --url=https://subdomain.example.com/matomo/"

and get as result

INFO [2020-11-16 11:45:20] 378178 ---------------------------
INFO [2020-11-16 11:45:20] 378178 INIT
INFO [2020-11-16 11:45:20] 378178 Running Matomo 3.14.1 as Super User
INFO [2020-11-16 11:45:20] 378178 ---------------------------
INFO [2020-11-16 11:45:20] 378178 NOTES
INFO [2020-11-16 11:45:20] 378178 - 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 [2020-11-16 11:45:20] 378178 See the doc at: https://matomo.org/docs/setup-auto-archiving/
INFO [2020-11-16 11:45:20] 378178 - Async process archiving supported, using CliMulti.
INFO [2020-11-16 11:45:20] 378178 - Reports for today will be processed at most every 900 seconds. You can change this value in Matomo UI > Settings > General Settings.
INFO [2020-11-16 11:45:20] 378178 - Reports for the current week/month/year will be requested at most every 3600 seconds.
INFO [2020-11-16 11:45:20] 378178 - Archiving was last executed without error 39 min 59s ago
INFO [2020-11-16 11:45:20] 378178 ---------------------------
INFO [2020-11-16 11:45:20] 378178 START
INFO [2020-11-16 11:45:20] 378178 Starting Matomo reports archiving...
INFO [2020-11-16 11:45:20] 378178 - tracking data found for website id 1 since 2020-11-16 11:05:21 UTC (since the last successful archiving)
INFO [2020-11-16 11:45:20] 378178 Will pre-process for website id = 1, period = day, date = last2
INFO [2020-11-16 11:45:20] 378178 - pre-processing all visits
INFO [2020-11-16 11:45:20] 378178 Archived website id = 1, period = day, 0 segments, 39852 visits in last 2 days, 7702 visits today, Time elapsed: 0.380s
INFO [2020-11-16 11:45:20] 378178 Skipped website id 1 periods processing, already done 40 min 16s ago, Time elapsed: 0.380s
INFO [2020-11-16 11:45:20] 378178 - tracking data found for website id 2 since 2020-11-16 11:05:21 UTC (since the last successful archiving)
INFO [2020-11-16 11:45:20] 378178 Will pre-process for website id = 2, period = day, date = last2
INFO [2020-11-16 11:45:20] 378178 - pre-processing all visits
INFO [2020-11-16 11:45:21] 378178 Archived website id = 2, period = day, 0 segments, 16914 visits in last 2 days, 5608 visits today, Time elapsed: 0.366s
INFO [2020-11-16 11:45:21] 378178 Skipped website id 2 periods processing, already done 40 min 6s ago, Time elapsed: 0.367s
INFO [2020-11-16 11:45:21] 378178 - tracking data found for website id 3 since 2020-11-16 11:05:21 UTC (since the last successful archiving)
INFO [2020-11-16 11:45:21] 378178 Will pre-process for website id = 3, period = day, date = last2
INFO [2020-11-16 11:45:21] 378178 - pre-processing all visits
INFO [2020-11-16 11:45:21] 378178 Archived website id = 3, period = day, 0 segments, 1963 visits in last 2 days, 620 visits today, Time elapsed: 0.371s
INFO [2020-11-16 11:45:21] 378178 Skipped website id 3 periods processing, already done 40 min 3s ago, Time elapsed: 0.372s
INFO [2020-11-16 11:45:21] 378178 Done archiving!
INFO [2020-11-16 11:45:21] 378178 ---------------------------
INFO [2020-11-16 11:45:21] 378178 SUMMARY
INFO [2020-11-16 11:45:21] 378178 Total visits for today across archived websites: 13930
INFO [2020-11-16 11:45:21] 378178 Archived today's reports for 3 websites
INFO [2020-11-16 11:45:21] 378178 Archived week/month/year for 0 websites
INFO [2020-11-16 11:45:21] 378178 Skipped 0 websites
INFO [2020-11-16 11:45:21] 378178 - 0 skipped because no new visit since the last script execution
INFO [2020-11-16 11:45:21] 378178 - 0 skipped because existing daily reports are less than 900 seconds old
INFO [2020-11-16 11:45:21] 378178 - 3 skipped because existing week/month/year periods reports are less than 3600 seconds old
INFO [2020-11-16 11:45:21] 378178 Total API requests: 3
INFO [2020-11-16 11:45:21] 378178 done: 3/3 100%, 13930 vtoday, 3 wtoday, 0 wperiods, 3 req, 1296 ms, no error
INFO [2020-11-16 11:45:21] 378178 Time elapsed: 1.296s
INFO [2020-11-16 11:45:21] 378178 ---------------------------
INFO [2020-11-16 11:45:21] 378178 SCHEDULED TASKS
INFO [2020-11-16 11:45:21] 378178 Starting Scheduled tasks...
INFO [2020-11-16 11:45:21] 378178 done
INFO [2020-11-16 11:45:21] 378178 ---------------------------

I think this cron is working, but why I get still no green checked icon and have instead this text

For optimal performance and a speedy Matomo, it is highly recommended to set up a crontab to automatically archive your reports, and to disable browser triggering in the Matomo settings.

Is this here a bug with cron-detection? Is here no green checked icon? Is here a error in my cron line? Thanks.

@Findus23 commented on November 16th 2020 Member

and to disable browser triggering in the Matomo settings.

Just to double-check: Did you disable browser triggering in the Matomo settings?

@Daijobou commented on November 16th 2020

No, because "Last Successful Archiving Completion" tells me that it does not work and if I turn off "Browser trigger archiving", nothing would be archived. At least I would expect that. I also didn't read out that this is a mandatory setting when you enable cron. Because its a "Tip" and its optional described as "you can".

you can set up Matomo so that requests in the user interface do not trigger archiving.

I have now deactivated it and its green checked.

The archiving process completed successfully 00:22:09 ago.

Maybe clarify with a sentence that "Last Successful Archiving Completion" only gets a green check mark if you disable "Browser trigger archiving"? Or I am just too stupid to understand it.

Thanks for the quick help!

@tsteur commented on November 16th 2020 Member

Thanks for the feedback @Daijobou

we've made some improvements there as part of Matomo 4 already where it now says like
image

This Issue was closed on November 16th 2020
Powered by GitHub Issue Mirror