Mautic: 4.4.12 (Apache2)
My PHP version is : PHP 8.0.30 (cli) (built: Jun 6 2024 16:51:07) ( NTS )
My MySQL/MariaDB version is mysql Ver 15.1 Distrib 10.6.18-MariaDB
/bin/php -v
PHP 8.0.30 (cli) (built: Jun 6 2024 16:51:07) ( NTS )
I guess it’s cli version
My problem is :
I can’t get cron working using crontab -e here the code:
-
-
-
-
- /bin/php /var/www/html/bin/console mautic:segments:update --env=prod
*/2 * * * * /bin/php /var/www/html/bin/console mautic:campaigns:update --env=prod
*/5 * * * * /bin/php /var/www/html/bin/console mautic:campaigns:trigger --env=prod
- /bin/php /var/www/html/bin/console mautic:segments:update --env=prod
-
-
-
If I do from ssh terminal, it works perfectly:
/bin/php /var/www/html/bin/console mautic:segments:update
Steps:
- I made a segment with filter saying Tags including mycontact
- I create a new contact and add a tag: mycontact
- I wait for cron run and expect to see in the segment.
- If I lunch the script from ssh it works and I see the new contact in the segment.
isn’t it ?
Steps I have tried to fix the problem :
I have tried many solutions without success; before adding --env=prod at the end of the command I was having error in the log saying the command not recognized…etc now I don’t have any line in mautic logs.
Thanks