3

I am using cron job in magento which runs for every 2 minutes. And I have set the ubuntu cron job to run magento's cron.sh for evey 5 minutes. The cron job of magento is initiating fine, it can be track down in the cron_schedule table which is in pending status.

The problem is, the cron job is not running either its not changing the status.

After some time it is going to the missing status http://prntscr.com/7o4zwv with the following message

exception 'Mage_Core_Exception' with message 'Too late for the schedule.' in /var/www/html/sports/app/Mage.php:595
Stack trace:
#0 /var/www/html/sports/app/code/core/Mage/Cron/Model/Observer.php(293): Mage::throwException('Too late for th...')
#1 /var/www/html/sports/app/code/core/Mage/Cron/Model/Observer.php(72): Mage_Cron_Model_Observer->_processJob(Object(Mage_Cron_Model_Schedule), Object(Mage_Core_Model_Config_Element))
#2 /var/www/html/sports/app/code/core/Mage/Core/Model/App.php(1338): Mage_Cron_Model_Observer->dispatch(Object(Varien_Event_Observer))
#3 /var/www/html/sports/app/code/core/Mage/Core/Model/App.php(1317): Mage_Core_Model_App->_callObserverMethod(Object(Mage_Cron_Model_Observer), 'dispatch', Object(Varien_Event_Observer))
#4 /var/www/html/sports/app/Mage.php(448): Mage_Core_Model_App->dispatchEvent('default', Array)
#5 /var/www/html/sports/cron.php(76): Mage::dispatchEvent('default')
#6 {main}

Is there anything am i missing here?

2

I am using cron job in magento which runs for every 2 minutes. And I have set the ubuntu cron job to run magento's cron.sh for evey 5 minutes

That's your issue.

Change the system cron to be executed at least as frequently as the most frequent task (ie. every 2 minutes in this case).


It is important to check that you don't have any task overlap (ie. one task taking so long it prevents others from running).

Aoe Scheduler is excellent for visualising this and it also supports blacklist/whitelisting tasks (if you do have one that runs for too long blocking other tasks).

  • Hi, i tried by making magento cron to run for every 5 minutes, also the ubuntu cron for every 5 minutes.. But still its not working, Is there any other way to solve it?? – Ashhar Azeez Jul 5 '15 at 10:41
  • Yes, change the cron frequency to every two minutes as I suggested. – Ben Lessani - Sonassi Jul 5 '15 at 21:19

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.