0

Quite often when I'm attempting to create a CRON job I'll mess up along the way and the job will fail to run.

Typically I'd check my logs and see where I went wrong, put the missing semicolon back, and continue on my way, but when it comes to cron jobs Magento rarely gives you any information of substance.

The messages field is null in the cron_jobs table, no messages are left in the Php error logs, none in the magento exceptions, none in cron.log, and none anywhere else I can think of to check, but the job still gets an "error" status.

Am I just not looking in the correct place for these errors or is there some way to make the cron log them somewhere?

0

In my case, setting

ini_set('display_errors', 1);

Helped immensely. I was under the impression that error_reporting(E_ALL); would show errors and for the most part it did but under some circumstances, but setting the above line in app/bootstrap.php shows a lot more errors that I was not aware of due to no visible loss of functionality.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.