Once I updated the cron, the wecome email is sent.
However, if I repeat another manual lead add and set its campaign, mautic did not send welcome email. Do I need to update the cron all the time ?
The welcome email was not triggered automatically everytime I add new lead.
However, if I run the cron command manually from SSH, the welcome email was sent
~$ php apps/mautic/public/app/console mautic:campaigns:trigger --env=prod
Triggering events for campaign 1
Triggering first level events
1 total events(s) to be processed in batches of 100
1/1 [============================] 100%
1 event(s) executed
Triggering scheduled events
0 total events(s) to be processed in batches of 100
0 event(s) executed
Triggering 'non-action' events
7 total lead(s) to be analyzed in batches of 100
14/14 [============================] 100%
0 event(s) executed
Then your cron is not configured properly. Check the path to Mautic. That is the most common mistake. If you cannot make it work, contact the provider of your server and ask him for help with cron configuration.
# Good: works as if requested through your browser.
@hourly wget -q -O - "http://example.com/cron.php"
# Bad: may not work at all or may have errors.
@hourly php5.6-sp /srv/users/serverpilot/apps/APPNAME/public/cron.php
When I run this command directly into SSH
php5.6-sp /srv/users/serverpilot/apps/mautic/public/app/console mautic:campaigns:trigger --env=prod
Sometimes it runs well, but sometimes it throws errors : Script in progress. Use -f or --force to force execution
Does Mautic has cron php file that allows me to run the cron using wget -q -O - "http://example.com/cron.php?
Upon clicking on the campaign trigger link, I got this:
[RuntimeException]
Failed to start the session because headers have already been sent by "/srv/users/serverpilot/apps/mautic/public/command.php" at line 51.