# Cronjob only triggers manually

**URL:** <https://forum.mautic.org/t/cronjob-only-triggers-manually/4372>\
**Category:** Product Support\
**Created:** [June 17, 2016, 3:22pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372 "2016-06-17T15:22:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 17, 2016, 3:22pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/1 "2016-06-17T15:22:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 20, 2016, 2:13pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/2 "2016-06-20T14:13:17Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 20, 2016, 2:32pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/3 "2016-06-20T14:32:00Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![arjon](https://avatars.discourse-cdn.com/v4/letter/a/ed8c4c/32.png) [@arjon](https://forum.mautic.org/u/arjon)\
**Post date:** [June 18, 2016, 9:16am UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/4 "2016-06-18T09:16:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![tiagorodrigues](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/tiagorodrigues/32/476_2.png) [@tiagorodrigues](https://forum.mautic.org/u/tiagorodrigues)\
**Post date:** [June 18, 2016, 4:40am UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/5 "2016-06-18T04:40:43Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Scalar](https://avatars.discourse-cdn.com/v4/letter/s/76d3ee/32.png) [@Scalar](https://forum.mautic.org/u/Scalar)\
**Post date:** [June 17, 2016, 3:22pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/6 "2016-06-17T15:22:13Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![designedbyks](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/designedbyks/32/6742_2.png) [@designedbyks](https://forum.mautic.org/u/designedbyks)\
**Post date:** [March 26, 2022, 1:27pm UTC](https://forum.mautic.org/t/cronjob-only-triggers-manually/4372/8 "2022-03-26T13:27:07Z")

</div>

Hello everyone,I am new to mautic.I have set up everything.Everything is working perfectly other than cron jobs.Cron jobs are working only when i execute on command line but they are not triggered automatically.  
Any help would be greatly appreciated.  
Thanks
