MAUTIC
My Mautic version is: 4.0.0
My PHP version is: PHP Version 7.4.33
My Database type and version is: MariaDB (10.6.12-MariaDB-0ubuntu0.22.04.1)
Your problem
My problem is:
I added two contacts manually. I added tags to both contact.
Then I created a new Segment and added a filter for the Tag values I just assigned to the contacts.
After that, I was expecting the two contacts to be linked to the segment, but the segment still says “No contacts”
What can I do to fix this? I am just staring off with Mautic and this is just Day-1 for me
I read somewhere that I may need to run cron job of some sort, but I could not find the information for it.
I am running Mautic on AWS EC2, so any related guidance would be greatly appreciated.
Hi @joeyk
Thanks for your reply.
Yes I have SSH access.
I also added the cron job to the server like this: * * * * * /usr/local/bin/php /var/www/html/mautic/bin/console mautic:segments:update —env=prod > /dev/null 2>&1
When I do crontab -l I can see this line of code. But still the segment is not getting updated with tagged contacts.
1 total contact(s) to be added in batches of 300
1/1 [============================] 100%
0 total contact(s) to be removed in batches of 300
1 contact(s) affected
The script ran successfully and updated the segment with a contact that was tagged.
So looks like if I execute through SSH, its working. Somehow the cron job is not executing on its own.
So I did crontab -e
Edited my cron job string to the one above that worked.
SSH said: “crontab: installing new crontab”
I waited a few minutes and checked, but the segment was not updated
Ok looks like it is working now.
Thanks a lot for brainstorming this with me
Only problem I noticed is that once the script runs and it adds a contact to the segment and later if I remove the contact from segment manually, it does not add that contact again.
This is how it should work.
Once a contact is manually removed (you must have a reason to do so), it will be immune to the segment filters. This is your own protection not to create infinate loops and crash your own server.