Automations not starting

Your software
My Mautic version is: 3.3.1
My PHP version is: 7.4
My Database type and version is: MySQL (no idea which version)

Your problem
My problem is: my automated campaign isn’t working

These errors are showing in the log:

Empty (both the server log and Mautic Log)

Steps I have tried to fix the problem:

I set up a simple campaign to test everything, with these steps:

  1. Subscribe in a form
  2. send a welcome email to the subscriber
  3. send the same email to the owner of the account (me)
  4. wait for an hour and send the same email again

A part from the campaign, I set up the corn jobs, like this:
|/15|||||php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:segments:update |*/5|*|*|*|*|php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:campaigns:update
|
/10|||||php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:campaigns:trigger |*/5|*|*|*|*|php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:messages:send
|0,30|||||php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:emails:send |0|0|*|*|*|php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:email:fetch

Is there something I’m missing? I also tried to clear the cache, but with no result.

Thank you :slight_smile:

If you are use “queue” for email as opposed to “send immediately” try swiftmailer:spool:send command

1 Like

Hi @EJL :slight_smile:
thank you for your advice . Unfortuntately it didn’t work.

The strange thing happened: yesterday evening, without touching anything or chainging any setting, the first email of the series was sent. After 10 hours the second one was sent (even if, in the campaign, it should have been sent after 1 hour).

Is it possible that there’s an issue with my crons or a conflict with my server cache (Varnish and Cachewall)?

Hi @enricosigurta .

When scheduling the mailers inside the campaign have you marked the mailers as transactional or marketing mailers ?

I ask as I see that in point #4 you are resending the “same email again”. If this is set as a marketing email it will not be sent again as the system is set up in the way that it will not send the same marketing email to a contact twice in a campaign.

If it is set like this change it to a transactional mailer and try fire up your campaign again.

Look forward to hearing if this might help

2 Likes

I doubt cache has anything to do with it. What are the specifics of your mail setup? Your own server? A third party like Mailgun? API?
@mikew makes a good point. Transactional emails are handled differently than marketing messages.

1 Like

Thank you @EJL and @mikew :slight_smile:

I double checked and both emails are transactional. Also, I noticed I didn’t mention something (That might be helpful). Between the subscription step and the first email sending, there’s another event: adding the contact to a segment.

I subscribed with anew email and I see that only the first contact was added to the segment (the one that received the emails). The other test contacts never received anything and were never put into the segment.

About the email server, right now I’m using Mailgun. I double checked on their log and I see that there was never a request to send an email in the first place (except the ones that were sent).

Thank you for the help you are giving me :slight_smile:

1 Like

This error appeared in the log (without me doing anything): [2021-03-29 08:52:33] mautic.WARNING: PHP Warning - mysqli_stmt::bind_result(): Server returned unknown type 245. Probably your client library is incompatible with the server version you use! - in file /home/zezaph5/public_html/omqiway.net/crm/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/Mysqli/MysqliStatement.php - at line 197 {“params”:null,“meta”:"[object] (mysqli_result: {“current_field”:null,“field_count”:null,“lengths”:null,“num_rows”:null,“type”:null})",“fields”:["[object] (stdClass: {“name”:“is_published_0”,“orgname”:“is_published”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:1,“charsetnr”:63,“flags”:36865,“type”:1,“decimals”:0})","[object] (stdClass: {“name”:“date_added_1”,“orgname”:“date_added”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“created_by_2”,“orgname”:“created_by”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“created_by_user_3”,“orgname”:“created_by_user”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“date_modified_4”,“orgname”:“date_modified”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“modified_by_5”,“orgname”:“modified_by”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“modified_by_user_6”,“orgname”:“modified_by_user”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_7”,“orgname”:“checked_out”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:19,“charsetnr”:63,“flags”:128,“type”:12,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_by_8”,“orgname”:“checked_out_by”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:11,“charsetnr”:63,“flags”:32768,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“checked_out_by_user_9”,“orgname”:“checked_out_by_user”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“id_10”,“orgname”:“id”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:10,“charsetnr”:63,“flags”:49699,“type”:3,“decimals”:0})","[object] (stdClass: {“name”:“name_11”,“orgname”:“name”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:4097,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“description_12”,“orgname”:“description”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“system_13”,“orgname”:“system”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:1,“charsetnr”:63,“flags”:36865,“type”:1,“decimals”:0})","[object] (stdClass: {“name”:“source_14”,“orgname”:“source”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:4097,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“columns_15”,“orgname”:“columns”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“filters_16”,“orgname”:“filters”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“table_order_17”,“orgname”:“table_order”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“graphs_18”,“orgname”:“graphs”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“group_by_19”,“orgname”:“group_by”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“aggregators_20”,“orgname”:“aggregators”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:45,“flags”:16,“type”:252,“decimals”:0})","[object] (stdClass: {“name”:“settings_21”,“orgname”:“settings”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:4294967295,“charsetnr”:63,“flags”:144,“type”:245,“decimals”:0})","[object] (stdClass: {“name”:“is_scheduled_22”,“orgname”:“is_scheduled”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:1,“charsetnr”:63,“flags”:36865,“type”:1,“decimals”:0})","[object] (stdClass: {“name”:“schedule_unit_23”,“orgname”:“schedule_unit”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“to_address_24”,“orgname”:“to_address”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“schedule_day_25”,“orgname”:“schedule_day”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})","[object] (stdClass: {“name”:“schedule_month_frequency_26”,“orgname”:“schedule_month_frequency”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})"],“columnNames”:[“is_published_0”,“date_added_1”,“created_by_2”,“created_by_user_3”,“date_modified_4”,“modified_by_5”,“modified_by_user_6”,“checked_out_7”,“checked_out_by_8”,“checked_out_by_user_9”,“id_10”,“name_11”,“description_12”,“system_13”,“source_14”,“columns_15”,“filters_16”,“table_order_17”,“graphs_18”,“group_by_19”,“aggregators_20”,“settings_21”,“is_scheduled_22”,“schedule_unit_23”,“to_address_24”,“schedule_day_25”,“schedule_month_frequency_26”],“col”:"[object] (stdClass: {“name”:“schedule_month_frequency_26”,“orgname”:“schedule_month_frequency”,“table”:“m0_”,“orgtable”:“maucq_reports”,“def”:"",“db”:“zezaph5_maut180”,“catalog”:“def”,“max_length”:0,“length”:764,“charsetnr”:45,“flags”:0,“type”:253,“decimals”:0})",“refs”:[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],“value”:null,“key”:26}

Can this be related to the issue above? Still, by the way, the system isn’t segmenting through the automation :thinking:

Sorry for another update (but I really need this to work correctly). I went on my older posts and I tried, from the config file, to change the db type from ‘mysqli’ to 'pdo_mysql". I ran the doctrine:schema:validate and got this from the log:

[2021-03-30 02:16:44] mautic.WARNING: Command doctrine:schema:validate exited with status code 3

Could this be an indication that I’m on the right way? If so, what should I do?

Another update (I hope this isn’t an issue, me writing a lot :slight_smile: ). I dug into the forum and I tried to correct the cron jobs from something like this:
php /home/zezer/public_html/ompaway.net/crm/bin/console mautic:email:fetch

to this:
usr/local/bin/ea-php99 /home/zezer/public_html/ompaway.net/crm/bin/console mautic:email:fetch --env=prod

And I waited a couple of hours, just to give some time to the cron to activate a few times.

Now, the segmentation still doesn’t work. However, both the bin/error_log and the log inside the admin panel have received no new errors.

Do you think there’s still something I’m missing from this whole setup? Thank you :slight_smile:

Another update. I’m still scouring around the forum, searching for a solution, but so far nothing.

I tried to run the cron jobs inside the terminal (After cleaning the prod cache) and they all say they have 0 contacts to process. However, inside Mautic, I have this:

Keep in mind. Based on the campaign settings, those 3 contacts should have been processed immediately after their subscription to the campaign (and they have been there for days now).

Any help? Thank you :slight_smile:

So if you run campaign:trigger and campaign:update, in your ssh, what is the feedback?

1 Like

They gave 0 contacts that needed to be processed.

I tried different things. In the end it was the cron jobs. They were not working because they were calling the wrong PHP function (it wasn’t PHP, nor php-cli, it was a different path). It’s still a mystery to me why in ssh I only needed to call PHP, while in the cron I have to call a different path. But hey, this is one big technical mystery :slight_smile:

Thank you for your help everyone :smiley: