# Cron jobs event record or logs

**URL:** <https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551>\
**Category:** Product Support\
**Created:** [November 8, 2021, 6:55pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551 "2021-11-08T18:55:39Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 8, 2021, 6:55pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/1 "2021-11-08T18:55:39Z")

</div>

**Your software**  
My Mautic version is: 4.0.1  
My PHP version is: 7.4  
My Database type and version is: MySQL 8+

**Your problem**  
My problem is: Cron Jobs is not recording events in log of any job performed. Is there a log in Mautic to show that cron job was process sucessfully?

These errors are showing in the log: No error shown

Steps I have tried to fix the problem:  
I compressed a duplicate copy of software and database then move it to a testing server with similar specification. The testing server are able to process and update the segment but the production server at first gave off permission error then I change the cron job string and now it a blank log … THere is nothing record and the log is cleared every time cron job is executed.

Permission error was caused by using just “php” string so when I replace it with relative path string “/usr/local/bin/php -q”. no more permission error but the segment is not update and the log is blanked out every time cron job is executed.

Any idea what I may be doing wrong?

---

<div class="post-metadata">

**Author:** ![deepti](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deepti/32/411_2.png) [@deepti](https://forum.mautic.org/u/deepti)\
**Post date:** [November 8, 2021, 7:11pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/2 "2021-11-08T19:11:58Z")

</div>

can you share what all cron jobs you added ?

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 8, 2021, 7:14pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/3 "2021-11-08T19:14:26Z")

</div>

@deepti

Here is one /usr/local/bin/php -q /home/(user)/public\_html/bin/console mautic:segments:update \>/home/(user)/mautic/cronjobs/segments\_update.log 2\>&1

---

<div class="post-metadata">

**Author:** ![deepti](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deepti/32/411_2.png) [@deepti](https://forum.mautic.org/u/deepti)\
**Post date:** [November 9, 2021, 4:35am UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/4 "2021-11-09T04:35:12Z")

</div>

that’s wrong

---

<div class="post-metadata">

**Author:** ![deepti](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/deepti/32/411_2.png) [@deepti](https://forum.mautic.org/u/deepti)\
**Post date:** [November 9, 2021, 4:35am UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/5 "2021-11-09T04:35:41Z")

</div>

> [@techbill](#):
>
> /usr/local/bin/php -q /home/(user)/public\_html/bin/console mautic:segments:updat

/usr/local/bin/php /home/(user)/public\_html/bin/console mautic:segments:update

try this

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 9, 2021, 9:42pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/6 "2021-11-09T21:42:38Z")

</div>

> [@deepti](#):
>
> /usr/local/bin/php

Yes I have tried this … still nothing. It executes but record nothing

/usr/local/bin/php - executes but nothing is logged

/usr/local/bin/ea-php74 - executes but nothing is logged

php - executes but give 500 error in log

I think this server php bin aer set tighter than a frog’s anal and there’re something in the script it doesn’t like.

---

<div class="post-metadata">

**Author:** ![EJL](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/ejl/32/12155_2.png) [@EJL](https://forum.mautic.org/u/EJL)\
**Post date:** [November 10, 2021, 6:39pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/7 "2021-11-10T18:39:51Z")

</div>

add -vvv to your cron for verbose logging. You can enable debugging by marking debug = true in your local.php file

---

<div class="post-metadata">

**Author:** ![techbill](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mautic.org/techbill/32/8325_2.png) [@techbill](https://forum.mautic.org/u/techbill)\
**Post date:** [November 11, 2021, 2:06pm UTC](https://forum.mautic.org/t/cron-jobs-event-record-or-logs/21551/8 "2021-11-11T14:06:55Z")

</div>

We managed to narrow it down to a memory error and got it working again!

Thank you everyone!
