Jump to content
iwato

UNIX CronTab Specification

Recommended Posts

GREETING:  I would like to wish everyone at W3Schools a very Happy New Year!

BACKGROUND:  In an effort to speed up Matomo's performance without having to create a routine that will retrieve, save, and call the desire data -- a procedure suggested earlier by others --  I am seeking to set up a Matomo CRON job that apparently does the same with no additional coding on my part.  Unfortunately, I am confused by the syntax.

CODE (RECOMMENDED BY MATOMO):

5 * * * * www-data /usr/bin/php5 /path/to/piwik/console core:archive --url=http://example.org/piwik/ > /home/example/piwik-archive.log

QUESTION:  To what refers the phrase core:archive in the above code segment?

NOTE:  Within the path/to/piwik folder there exists a document file called console.  Within the path/to/piwik/core folder there exists a file called Console.php, a folder called Archive, and a file called Archive.php.  There are various files in the Archive folder, but none of them resemble very closely any of the folders and files just mentioned.

Roddy

Edited by iwato

Share this post


Link to post
Share on other sites

Hi Roddy,

Here's what I can piece together from the help file. (If I'm not mistaken, it may be the one you are referring to)

https://matomo.org/docs/setup-auto-archiving/

 

`core:archive` is the command being run, much like 'mkdir' or 'cat' in other command lines. I am unsure of whether the command is in two parts and parsed together (archive command of core module) or otherwise. At the bottom of the page, you can see the help output of the command.

Share this post


Link to post
Share on other sites

Yes, your link is the same that caused me to ask the question.  I will explore a little further with the idea of looking for a command.

Thank you for responding.

Roddy

Share this post


Link to post
Share on other sites

Those are just parameters that get passed to the console application.  When the shell executes the console application, it passes all of the command-line parameters to it.  One parameter will be "core:archive" and the other will be the --url parameter.  It will also have the entire command available.  Look up argv and argc in C for a general description about how that works.

https://developer.matomo.org/guides/piwik-on-the-command-line

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×