Set up auto archive crontab on Bitnami installation

I’m having a hard time getting auto archiving to work.

I’m using this Bitnami installation: Matomo Cloud Hosting, Deploy Matomo

I’m trying to run the archiving command but every time I run it, there’s no output. This is the command I’m running.

sudo su tb-matomo-admin -s /bin/bash -c "/opt/bitnami/php/bin/php /opt/bitnami/apps/matomo/htdocs/core core:archive --url=https://mywebsite.com"

‘/opt/bitnami/php/bin/php’ is the output of ‘which php’

‘/opt/bitnami/apps/matomo/htdocs/core’ is the directory where the ‘Console.php’ file exists.

As stated, this command gives no output after running. I’m also curious where I should actually save my file so that it get’s executed properly? The bitnami file structure doesn’t seem compatible with the current documentation from Matomo?

Try adding > /tmp/piwik-archive.log to your inner command and look if it creates the log file.

I’m not familiar with Bitnami? Do you not have access to the /etc/crontab?

That does create a log file, but it’s empty. There doesn’t seem to be a /etc/crontab, but there is a /etc/cron.daily /etc/cron.hourly etc. that I have access to.

Bitnami made an app that automates the installation of Matomo on an Azure VM. Apparently with a strange file structure.

Ok I actually was able to manually trigger the archiving like this:

/opt/bitnami/php/bin/php /opt/bitnami/apps/matomo/htdocs/console core:archive --url=https://mywebsite.com > /opt/bitnami/apps/matomo/htdocs/tmp/piwik-archive.log

turns out I was pointing to the wrong folder for the console.

I put the job in etc/cron.d so hopefully it works now.