Bonjour,
J’utilise docker pour faire tourner Matomo et j’ai mis en place un cron pour faire fonctionner l’auto-archivage.
Voici mon crontab :
*/5 * * * * su www-data -s /bin/bash -c '/usr/local/bin/php /var/www/html/console core:archive --url=https://matomo.XXX.com/ 2>/tmp/matomo-archive-error.log >/tmp/matomo-archive.log'
La tâche du cron se déclenche bien toutes les 5min, mais la commande php ne produit aucun effet.
Les fichiers matomo-archive-error.log et matomo-archive.log sont bien créés, mais sont vides (o octet).
Le plus étrange est que si je lance manuellement la commande suivante depuis le shell du conteneur, cela fonctionne parfaitement bien
su www-data -s /bin/bash -c '/usr/local/bin/php /var/www/html/console core:archive --url=https://matomo.XXX.com/ 2>/tmp/matomo-archive-error.log >/tmp/matomo-archive.log'
Si quelqu’un a une idée lumineuse … je suis preneur…
Merci d’avance pour votre aide…