@snomisneb opened this Issue on November 28th 2018

The Personal Email Reports function is inconsistent on my system.
I’ve scheduled 2 reports @ 8 o'clock UTC.
Sometimes I receive reports @ 9:09 or 10:43 but mostly I do not receive any reports al all.
The scheduler is not working as it supposed to be. Is there anything I can do or check?

I’m running Matomo 3.7.0 on Ubuntu 16.04 with Apache and MariaDB.

@Findus23 commented on November 28th 2018 Member

Hi,

Quick question: Do you habe cron set up?

@snomisneb commented on November 28th 2018

Nope!
I am familiar with crons but how can I set this up for Matomo?

@Findus23 commented on November 28th 2018 Member

PHP programs don't run permanently, but just when they are accessed. So the only times when Matomo can do something is when e.g. you log into Matomo or someone visits your website. Then Matomo aggregates the raw data and does scheduled tasks.

If you want reports to be already generated when you access Matomo and emails to be sent on time, you can instruct your server to call Matomo in regular intervals. On Linux (and co.) this can be done with the great tool cron (on Windows there is a similar Tool).

How exactly you do this depends a lot on your Server environment, but the most popular ones are explained here:
https://matomo.org/docs/setup-auto-archiving/#windows-how-to-set-up-auto-archiving-using-windows-scheduler

@tsteur commented on November 28th 2018 Member

As @Findus23 pointed out you will need to set up a cronjob to run for example hourly (recommended) and ideally also disable browser archiving as mentioned in the guide (will also give your Matomo a performance boost). Let us know if this doesn't fix your problem.

@snomisneb commented on November 29th 2018

@Findus23

I run many shell scripts on my Linux machines via cron.
Do I need to run the following task hourly via cron to fix my scheduled tasks?

/usr/local/bin/php -f /home/yourcpanelsitename/public_html/piwik/console core:archive --url=example.org/piwik/ > /home/example/piwik-archive-output.log

@Findus23 commented on November 29th 2018 Member

@snomisneb Exactly But of course with the correct php path, matomo path and url.

@snomisneb commented on November 29th 2018

@Findus23

Of course, I will give it a try today.
Thanks for your help so far.

This Issue was closed on November 28th 2018
Powered by GitHub Issue Mirror