Mautic Community Forums

Cron Jobs don't Work

Hi, my cron Jobs don’t work.
I receive this message to my email.

Content-type: text/html

<br />
<b>Parse error</b>: syntax error, unexpected ‘$result’ (T_VARIABLE) in <b>/home3/chucho/public_html/blusbel.xyz/mk/plugins/MauticCitrixBundle/Helper/CitrixHelper.php</b> on line <b>137</b><br />

My hosting is hostgator.
I hope you help me to solve this.

Logs file displays this
[12-Mar-2018 15:55:15 UTC] PHP Parse error: syntax error, unexpected ‘$result’ (T_VARIABLE) in /home3/chucho/public_html/blusbel.xyz/mk/plugins/MauticCitrixBundle/Helper/CitrixHelper.php on line 137

I was using php 5.6 and I updated to php 7 and problem still persist.

Oh man, I love you, I didn’t have Idea that was necessary set php version for use on cron jobs, mautic must say this in his documentation guide, I really appreciate you help me with this, I was 2 days trying to fix it, huge thanks to you.

Hello Everyone, greetings from Mexico. I am installing too for first time mautic and have the same problem with cron jobs, I am hosted with hostgator too.
jd26, can you please help me or MxyzptlkFishStix with the example of the correct command line?

I saw the hostgator article about versions. I checked and my site is on easyapache 3.

But I am lost in what to do> the example on the article says for PHP 7:

EasyApache 3

Command to run a PHP 7.0 cron job:

/opt/php70/bin/php /home/username/public_html/cron.php

My doubt is how to correct it: I have to create that command line or I have to edit all the mautic command lines with that example?

I appeciate if you can provide me with the right way to edit the command line to make mautic cron jobs working. Thank you very much.

Note:

I tried this way and in the log i got an message like this:

Command Line:

/opt/php70/bin/php-cli /home1/iweeks/mautic.mysite.com/app/console mautic:integration:pushleadactivity -integration=Sugarcrm >/home1/iweeks/mautic.mysite.com/app/commands.log 2>&1

Message in Log:

/usr/local/cpanel/bin/jailshell: /opt/php70/bin/php-cli: No such file or directory

I have no idea what is my problem, I am a begginer and do not know much.

Thank you again for guiding me!

Thank you, I found the solution and fixed it. Thank you for your post, it helped me.