Mautic Community Forums

Cronjob only triggers manually

Hi, I am having endless problems with mautic. Its a great bit of software but my god, getting it working is a nightmare.



My contacts are not being updated to segments via my cronjobs. So, as suggested on here, I have set up the cronjob.php script to manually trigger the crons. This then works and everything is triggered fine. No errors.



So why are my cron jobs not automatically working, yet my manual triggering is?



Is it the way my cronjobs are set up? I am using cpanel on a shared host.



*/2 php /home/schoolfo/public_html/mautic/app/console mautic:campaigns:update

*/2 php /home/username/public_html/mautic/app/console mautic:campaigns:trigger

*/2 php /home/username/public_html/mautic/app/console mautic:segments:update



I am being emailed the cron outputs but dont see any leads/contacts being updated, but I dont understand the output anyway.



Any help would be greatly appreciated.

Thanks

I installed the cronfig, but never got the API key so it was useless.
I tried it a few times, nothing.
Noting in spam either.

I changed the crongjob from php to php-cli and it seems to work now, however today my segments are not updating (to the filter I set using a custom field data).
So I ran the cronjobs manually and got this:

Script in progress. Use -f or --force to force execution.

I have done this numerous times, so the script counldnt always be in progress.

arjon, I will set my server to send me the outputs again to sort this segment update problem.

Thanks guys

Ok, I just added --force to the end of the cronjob command and it seems to be updating the segments now, ie triggering all the cronjobs.
I think the unreliability I have been experiencing with Mautic stems from the crons.
Why would -f or --force be needed? Do the cronjobs freeze?

Thanks guys!

It might be related to the server. Post your output here.

Hey @Scalar, I got the same problem here with a VPS running Ubuntu and ServerPilot. For now I used Cronfig as a workaround to this problem. It worked nice and with no bugs. Hope it helps yout too.

Hi, I am having endless problems with mautic. Its a great bit of software but my god, getting it working is a nightmare.

My contacts are not being updated to segments via my cronjobs. So, as suggested on here, I have set up the cronjob.php script to manually trigger the crons. This then works and everything is triggered fine. No errors.

So why are my cron jobs not automatically working, yet my manual triggering is?

Is it the way my cronjobs are set up? I am using cpanel on a shared host.

*/2 php /home/schoolfo/public_html/mautic/app/console mautic:campaigns:update
*/2 php /home/username/public_html/mautic/app/console mautic:campaigns:trigger
*/2 php /home/username/public_html/mautic/app/console mautic:segments:update

I am being emailed the cron outputs but dont see any leads/contacts being updated, but I dont understand the output anyway.

Any help would be greatly appreciated.
Thanks