Magento – Status of new Cron is missing in cron_schedule

configurationcroncrontabmagento-1.9

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

<crontab>
    <jobs>
        <disable_notifications>
            <schedule><cron_expr>*/5 * * * *</cron_expr></schedule>
            <run><model>notifications/cronjobs::disableNotifications</model></run>
        </disable_notifications>
        <test>
            <schedule><cron_expr>*/1 * * * *</cron_expr></schedule>
            <run><model>notifications/cronjobs::test</model></run>
        </test>
    </jobs>
</crontab>

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.

Best Answer

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.

Update

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.