Cron jobs event record or logs

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?

can you share what all cron jobs you added ?

@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

that’s wrong

/usr/local/bin/php /home/(user)/public_html/bin/console mautic:segments:update

try this

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.

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

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

Thank you everyone!