Auto-Archiving with Task Scheduler

So to set up auto-archiving in Matomo, they give you this link:
https://matomo.org/docs/setup-auto-archiving/

We run on Windows servers which are more updated than the versions they use in this article. Can someone help me with this? I am unsure how to set this up with windows server 2012R2

Hi,

Unfortunatly I (and I think most people from the Matomo team) have no experience with (PHP on) Windows, so I can’t directly help.

But I guess every guide on the internet on how to internet on how o create a scheduled task should apply as the only thing that matters is that php.exe gets executed.

If you know how to improve that guide, just contact us.


This is whats confusing me, after php.exe, what is that in the quotations? Any ideas?

In your Matomo directory there is a console file. And that is the path to where you are having that console file (so replace it with where you are storing Matomo)

And should that php.exe be in the same directory?

No, that is the path to where you have installed PHP.

Ahhh okay. I am going to give it a try now, thanks for the help

I just set it up, hopefully correctly. Where are these archived files going to go?

Hi,

Archiving is maybe a bit of a misnomer.

When people visit your website, their raw visit data (what happened) is stored in the visitor log. But to create all other reports, Matomo has to do more complex aggregation of all data. This is called archiving.

Normally this happens whenever you view a report. But the more data you have, the longer it takes. So if you have now setup auto-archiving, Matomo will create the reports on a regular basis. This has the huge advantage that whenever you open Matomo, the reports will already be available and Matomo feels much faster (as it just has to display them).

If you want to check if the archiving is working correctly, you can check the output of the task (I have no idea where you could find it on Windows)

My scheduled task did not run properly. I am still seeing the message in Matomo to set up auto archiving with no last known successful archives. Here is the task I set up based on the article Matomo provided.

Argument: E:\inetpub\wwwroot\sample.sample.edu\console" core:archive --url=https://sample.sample.edu"

Hi,

Can you check for the output of the task? When the archiver runs it shows a detailed log of what it does.

I don’t know where the task output is stored in Windows, but according to

You can use > filename at the end of the command to redirect the output into a file.

I fear that if I add that in the scheduled task to get the output into the file, it will just keep running and running like it did before with no end in sight. As a matter of fact, it is still showing that the task is running from 4 days ago, even though I stopped it and disabled it. I think the issue is with the way it was set up, as the instructions for 2008 seem to differ from 2012 R2

Is there any other way to find out what the problem is? Is there no updated guide for auto archiving in Windows Task scheduler?