I have some cronjob that sometime get stuck in running status.
That make me think that for some reason they produce and error but I cannot find any related log. ( the column messages in
cron_schedule is empty )
How can I be sure cron execution produce log in case of errors ?
How can I proceed to debug this issue, any advice ?
It looks 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 setStatus is never reached for some cron, that is the problem.
Please avoid give 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 the welcome if you just want 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 answer will not help other people with same issue ... but will just create confusion )