Hello,
I created a campaing based on a form. That form triggers an email which is send.
BUT: There is a big delay between the form submission and the email.
Example 1:
At June 4, 2016 8:07 pm, Form Submitted.
At June 4, 2016 8:07 pm, Contact Created.
At June 4, 2016 8:24 pm, Campaign Action Triggered.
At June 4, 2016 8:24 pm, E-Mail sent
Example 2:
At June 4, 2016 8:38 pm, Form Submitted.
At June 4, 2016 8:57 pm, Campaign Action Triggered.
E-Mail delivery is set to “immediate delivery”.
The campagins:trigger and campaigns:update run every 3 minutes.
So where does this big delay come from?
Thanks for your help!
Jan
Hello,
I created a campaing based on a form. That form triggers an email which is send.
BUT: There is a big delay between the form submission and the email.
Example 1:
At June 4, 2016 8:07 pm, Form Submitted.
At June 4, 2016 8:07 pm, Contact Created.
At June 4, 2016 8:24 pm, Campaign Action Triggered.
At June 4, 2016 8:24 pm, E-Mail sent
Example 2:
At June 4, 2016 8:38 pm, Form Submitted.
At June 4, 2016 8:57 pm, Campaign Action Triggered.
E-Mail delivery is set to “immediate delivery”.
The campagins:trigger and campaigns:update run every 3 minutes.
So where does this big delay come from?
Thanks for your help!
Jan
Check your cron job setting. Maybe is set to run every17 Minutes.
See above: The cronjobs run every 3 minutes.
Here is the complete list of my cron jobs:
Mautic campagins:trigger every 3 minutes
Mautic campaigns:update every 3 minutes
Mautic email:process every minute
Mautic fetch:email every hour
Mautic leadlist:update every 3 minutes
Mautic segments:update every 15 minutes
Mautic campaigns:trigger is the one that needs to be trigger less 1 minute
What cron job service are you using? Are you checking if the cron job has failed in several occasions?
Could be server Time setting?
Not in “any” order: in the same order as you can see in documentation.
So what is the right order? I checked the docs again and the just say “It is recommended that you stagger the following required jobs so as to not run the exact same minute.” https://mautic.org/docs/en/setup/cron_jobs.html
But how to do this? Let’s say I’m configuring one cronjob to run every 3 minutes and the other one every 5 minutes. After 15 minutes both will run!
The only way to do so is one big script processing all cronjobs one after another. But to me it seems that some script should be executed more often than ofters?
Meanwhile I’m getting cronjob results by email. It looks like they run very very very long. The segment update (triggering one new campagin action) finished 10 minutes ago. The campaign triger & update are runnings since then… For sending just one single email. Any ideas on that?
@pietromantovani Seems you were correct: The cronjobs were blocking each other by a lock file.
Solution:
Do not execute cron jobs separate but in (any?) order. Use a shell skript to do so or a PHP skript.
Maybe you have to add more skripts depending on your setup!
Shell:
php app/console mautic:segments:update 2>&1
php app/console mautic:campaigns:trigger 2>&1
php app/console mautic:campaigns:update 2>&1
PHP: (I need to call it using a HTTP wrapper)
[code]<?php
echo “
”;echo “*** segments:update ***nn”;
exec(“php app/console mautic:segments:update 2>&1”, $out, $result);
echo “Returncode: " .$result .”
";
echo “Ausgabe des Scripts: " .”
";
print_r(join($out, “n”));
$out = array();echo “nn*** campaigns:trigger ***nn”;
exec(“php app/console mautic:campaigns:trigger 2>&1”, $out, $result);
echo “Returncode: " .$result .”
";
echo “Ausgabe des Scripts: " .”
";
print_r(join($out, “n”));
$out = array();echo “nn*** campaigns:update ***nn”;
exec(“php app/console mautic:campaigns:update 2>&1”, $out, $result);
echo “Returncode: " .$result .”
";
echo “Ausgabe des Scripts: " .”
";
print_r(join($out, “n”));
?>
[/code]
Update: E-Mail arrived after 1 hour.
The email headers show that this is a mautic issue, not a problem of the mailservers. (It took just a few secounds there.)
Ok. That why I’ve said “could”. Another possibility: what about your cron setting? If you run all crons together every 3 minute I think you could get unpredictable result.
You should execute them in order.
@ninjoan Well the difference betweet 3 and 1 minute should not be that big deal? I use this HTTP wrapper to call the cronjobs because my hoster does not offer real cronjobs. Sadly I can’t check this. https://www.mautic.org/community/index.php/545-cron-job-set-up-problem/0#p2104
@pietromantovani How? Even if the server has a wrong timezone: A cronjob every three minutes is every three minutes. So I don’t understand how that should cause the problem.
I have a very similar problem again:
- Created a segment
- One contact is assigned to that segment
- Created a new campaign with the source of this segment
- Next action in the campaign is a simple email
- Launched campaign about 1 hour ago
- User has been assigned to that campaign
- But no email is sent until now
Is there a way to check which campaign steps were triggerd for which user?
@jantheofel : I have the same problem. Can you kindly advise step by step how to solve? Many thanks your help
TC