Hi guys.
I installed mautic on a subfolder of may domain, example www.mydomain.com/mautic
As part of the set-up, I understand I need to create cron jobs:
php /path/to/mautic/app/console mautic:leadlists:update --env=prod
php /path/to/mautic/app/console mautic:campaigns:update --env=prod
php /path/to/mautic/app/console mautic:campaigns:trigger --env=prod
and
php /path/to/mautic/app/console mautic:email:process --env=prod
So if I installed mautic as described above, what is the correct cron jobs code to use?
Thank you very much guys…sorry for the noob question.
Hi guys.
I installed mautic on a subfolder of may domain, example www.mydomain.com/mautic
As part of the set-up, I understand I need to create cron jobs:
php /path/to/mautic/app/console mautic:leadlists:update --env=prod
php /path/to/mautic/app/console mautic:campaigns:update --env=prod
php /path/to/mautic/app/console mautic:campaigns:trigger --env=prod
and
php /path/to/mautic/app/console mautic:email:process --env=prod
So if I installed mautic as described above, what is the correct cron jobs code to use?
Thank you very much guys…sorry for the noob question.
Hi,
Is your domain a shared hosting or dedicated server?
if it’s a shared hosting read here:
https://www.mautic.org/community/index.php/537-installing-mautic-on-shared-host-read-here/p1#p2234
if not, just use the path like /var/www/html/yourwebsite/mautic hope that is clear. You may have to invoke the php from your installation, so more details you share the better.
Hi @wootme.
Thank you for your answer. I am on a shared server - Hostgator. Do you know anything about setting up Mautic in Hostgator?
Thanks!
I contacted Hostgator support in case they can help with the cron jobs code, but he said they don’t provide that support. He gave me this link though:
http://support.hostgator.com/articles/cpanel/what-do-i-put-for-the-cron-job-command
I’m not sure what to think of the codes since Mautic cron jobs code looked different from what they posted in that link above.
Any help with this is highly appreciated. Thanks guys.
The commands they have are very similar. This should do it:
From Hostgator:
/opt/php55/bin/php /home/username/public_html/cron.php
Changed to fit mautic:
/opt/php55/bin/php /home/username/public_html/mautic_directory/app/console mautic:leadlists:update --env=prod
You just have to change the path to fit correctly, and instead of ‘cron.php’ you just want the ‘console’. Then a space followed by the commands. Create a new cron for each of the jobs listed here:
https://www.mautic.org/docs/setup/index.html
Hey @chad.windnagle.
Thank you very much. I will give it a test and will give you an update if it works or not.
Cron job is finally working… awesome! Thank you very much.
@wootme / @chad.windnagle / @fuzzyboy
How do I know the correct path like example ( /opt/php55/bin/php )? By cPanel?
@escopecz , A friend of mine has this issue with addon domain (/evolucaocontinua.com/):
1- Error log after running cron job:
[i]Content-type: text/html
Parse error: syntax error, unexpected T_STRING, expecting T_CONSTANT_ENCAPSED_STRING or '(' in /home/cpaneluser/public_html/evolucaocontinua.com/mautic/app/console on line 18
[/i]
2- Error log after running manual trigger:
[RuntimeException]
Failed to start the session because headers have already been sent by “/home/cpaneluser/public_html/evolucaocontinua.com/mautic/cron.php” at line 1.
ModSecurity might be envolved?
@Sokoban try to turn off the mod_security and you’ll know the answer. Also, please, start a new forum topic with a new question. Using already closed, unrelated topic cause:
- people who follow the topic will be spammed with information which is not related.
- people with the same problem you have will have hard time to find it.
You probably refer to the script which runs Mautic commands via browser. Make a link to that script (and other resources you mention) so others know what you are talking about. That’ll not only help others searching for answer to their similar problem, but it will also help those who want to answer your question, but they need complete information.