I am developing a custom module and in that I am using Cron to disable the status of notifications.

I have written this code in config.xml

            <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
            <schedule><cron_expr>*/1 * * * *</cron_expr></schedule>

All other crons expect this two are working fine and getting executed as scheduled but my crons are getting scheduled in database table 'cron_schedule' but the status updates in missed. enter image description here

Please let me know the solution. I am stuck with this problem from 3 days.

  • Can you provide the Exception caught pls? Nov 18, 2016 at 11:07
  • I am getting this message everytime when it is missed. exception 'Mage_Core_Exception' with message 'Too late for the schedule.' Nov 18, 2016 at 11:07

2 Answers 2


AFAIK, cron jobs are marked as missed based on the configuration under System > Configuration > Cron > Missed if not run within field.

I had the problem once where the cron was running once per hour, and that value was set to 15 minutes and thus a lot of jobs were marked as missed.

I suggest you ensure your cron runs every 5 minutes as suggested by the Magento documentation and if you can't do that, maybe update that configuration according to your configuration.


According to your database table, it seems like those cronjobs generate an exception as you can see from the exception column: exception Mage_Core_Exception with message Too... . I'm pretty sure that's the root cause of your problem. Open one of those rows and find the full exception. Fixing the exception would most likely fix your problem.

  • I have configured cron to run after every 5 minutes and I have also configured System > Configuration > Cron > Missed if not run within field. But both of them together didn't worked for me. Can you suggest any other option? Nov 18, 2016 at 10:59
  • @GauravAgrawal yes see my updated answer Nov 18, 2016 at 11:04
  • It shows exception: exception 'Mage_Core_Exception' with message 'Too late for the schedule.' in /var/www/html/magento/app/Mage.php:595. Nov 18, 2016 at 11:37
  • @GauravAgrawal well yeah that's the error that matches the description I gave you first. You definitely have a problem with your cron. Double check how your cron is configured on your server Nov 18, 2016 at 11:38
  • All the default cronjobs in magento like: newsletter_send_all, core_email_queue_send_all are executed successfully in that table. Nov 18, 2016 at 11:41

Make sure your config for system/cron/schedule_lifetime is at least as small as your "fastest" cron.

In app/code/core/Mage/Cron/Model/Observer you can find the relevant code:

$scheduleLifetime = Mage::getStoreConfig(self::XML_PATH_SCHEDULE_LIFETIME) * 60;
$now = time();
$time = strtotime($schedule->getScheduledAt());
if ($time < $now - $scheduleLifetime) {
    $errorStatus = Mage_Cron_Model_Schedule::STATUS_MISSED;
    Mage::throwException(Mage::helper('cron')->__('Too late for the schedule.'));

I'd also make sure your crontab executes cron.php (or cron.sh) in Magento's root folder, at least every minute since your notifications/cronjobs::test cron is supposed to run every minute.

  • What do you mean about this: Make sure your config for system/cron/schedule_lifetime is at least as small as your "fastest" cron. Nov 18, 2016 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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