Installation was very successful, but at the last point “Set up cronjob” there is an error message that I can’t eliminate. I have tried X variants, even my hosting provider could not help me.
MAILTOfirstname.lastname@example.org php /opt/plesk/php/8.1/bin/php /var/www/vhosts/ werkgalerie.ch/httpdocs/matomo.werkgalerie.ch/matomo/console core:archive --no-ansi >> /var/www/vhosts/werkgalerie.ch/logs/cron-matomo-archive.log/var/www/vhosts/werkgalerie/var/www/
/usr/local/psa/bin/chrootsh: /var/www/vhosts/werkgalerie.ch/logs/cron-matomo-archive.log/var/www/vhosts/werkgalerie/var/www/: No such file or directory
Can someone help me?
Best thanks and kind regards
I am not master in CRON, but maybe you should define somewhere the default log folder for your CRON call?
Thank you very much for your reply. Can you also tell me how and where to define this default log folder?
You need to set up the cron job as the root user not the system user.
You can do it in Plesk interface to make sure it plays well in the Plesk environment.
Plesk Admin > Tools & Settings > (Tools & Resources) Scheduled Tasks (Cron Jobs)
(Do NOT do this from within the domain)
Should look like this:
The command is like this:
/opt/plesk/php/8.1/bin/php /var/www/vhosts/domain.tld/httpdocs/console core:archive --no-ansi >> /var/www/vhosts/domain.tld/logs/cron-matomo-archive.log
Replace domain.tld with werkgalerie.ch of course and you can change the path to your log file to whatever you choose as well if you wish.
The first thing I noticed the cron command in your first post is there is a space before your domain in the path:
By the way, as a fellow Plesk user, have you used the Google Analytics Importer plugin to import historic data from GA into Matomo?