Magento 1.7 - Cron.php: Too Late for Schedule

I have created several modules that will run magento cron, but I always get an error. Figures:

  • Cron.php starts every 5 minutes.
  • system / cron / schedule_generate_every = 15
  • system / cron / schedule_ahead_for = 30
  • system / cron / schedule_lifetime = 15

The cronjobs module should run every 5 minutes. They are added correctly to cron_schedule for execution, i.e. in 2014-01-16 16:40:00, 2014-01-16 16:45:00, 2014-01-16 16:50:00 ... But for execution in 16:50 I get a lot of mistakes. exception 'Mage_Core_Exception' with the message "Too late for schedule." also for future work.

Perhaps: our local time is 17:50, server time is 16:50. But I do not remember that we had this problem before on other crowns.

+6
source share
1 answer

If cronjob starts every 5 minutes, try this configuration:

Generate Schedules Every 5 

(enter cronjob runtime here, in this case 5 minutes)

 Schedule Ahead for 125 

(based on cronjob execution time plus the maximum time it takes for one task. For example: creating a sitemap is 120 minutes, then enter 120 minutes + 5 = 125 minutes)

 Missed if Not Run Within 180 

(runtime of the longest process, for example: import takes 120 minutes, then enter 120 minutes + 60 minutes - because sometimes there is a difference between mysql and server time)

 History Cleanup Every 10 

(minimum runtime cronjob = 5 * 2 = 10 minutes in this case)

 Success History Lifetime 1440 

(cronjob storage duration to prove that everything is working fine. 1440 = 24 hours)

 Failure History Lifetime 1440 

(cronjob storage duration, to confirm if there is an error. 1440 = 24 hours)

Last but not least, install the AOE-Scheduler to visually control your cronjob.

http://www.magentocommerce.com/magento-connect/aoe-scheduler.html

+12
source

All Articles