I am working on Magento cron jobs issue. We have 50+ cron jobs in system which are scheduled and runs 24/7. But, there are some cron jobs like aoescheduler_heartbeat, aoecachecleaner, aoequotecleaner and captcha_delete_expired_images not running sometimes(ie with in 24hrs, 3 or 4 times not working). Is this due to configuration problem or memory problem or some other problem. If anyone of You know the solution, please post. Thanks in advance.

  • Do you have access to the Cron log on the server? – brentwpeterson Jul 8 '14 at 15:09
  • Yes, I have access to Cron log on the server – Naruto Jul 9 '14 at 6:40

This can happen if you have one particular cron task that takes a long time to execute. For instance if you have the following settings:

  • "Missed if Not Run Within" = 15
  • "Schedule ahead for" = 15

Then if cron_task_1 takes 16 minutes to execute, any other tasks blocked by cron_task_1 will be marked as "missed" and a schedule may not be generated for 30 minutes instead of 15.

You need to assess your cron tasks and find the ones that are taking a long time. Check the cron_schedule database table and look for big gaps between the executed_at and finished_at times. You may need to change your settings to allow for longer cron tasks or remove these from the Magento cron and run them separately using a tool like n98-magerun.

I'd also recommend installing AOE Scheduler to give better visibility over your cron tasks and also give you the ability to run multiple simultaneous crons.

| improve this answer | |

Try this link. You should prioritize the cron jobs according to your requirements.

| improve this answer | |
  • Thanks Ajay, for quick solution. I had prioritize them, but only sometimes they are not running ie also at night time. – Naruto Jul 8 '14 at 14:14

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.