I have some cronjob that sometimes gets stuck in running status.
That makes me think that for some reason they produce an error but I cannot find any related log. ( the column messages in
cron_schedule is empty )
How can I be sure cron execution produces logs in case of errors?
How can I proceed to debug this issue, any advice?
It looks like my question is not clear, so I'm adding some more content ( I am not sure it gonna help because most of the people seem to read the title and guess the question ... )
- I know how cron works
- I know how to check if a cronjobs run or not
- My cronjobs correctly run
The problem is some of the cronjobs do not end.
To be more clear:
$schedule ->setExecutedAt(strftime('%Y-%m-%d %H:%M:%S', time())) ->save(); call_user_func_array($callback, $arguments); $schedule ->setStatus(Mage_Cron_Model_Schedule::STATUS_SUCCESS) ->setFinishedAt(strftime('%Y-%m-%d %H:%M:%S', time()));
The status is never reached for some cron, that is the problem.
Please avoid give the random answer or just the first result google provide ( I know how to use google, I did my research ... )
If the answer is not clear, just let me know.
If you wanna help you are more than welcome if you just won't waste my and your time you are not. ( this site is meant for quality answers, it is not a forum where everybody says his opinion ... posting not related answers will not help other people with the same issue ... but will just create confusion )