4

I have some cron jobs which are just not run according to the AOE_Scheduler module. What can be the reason? Some others are running so it does not seem to be a general problem.

enter image description here

  • Not sure if this is your problem, but I had an issue with 2 crons set to run very close together and the first one took too long. I got a message in the cron_schedule table for my second cron Too late to schedule (or something like that). Check if this is the case for you. – Marius May 7 '14 at 11:33
  • Yes I also get to late for the schedule. – Alex May 7 '14 at 11:34
  • Then probably is the same thing as in my case. The error message comes from Mage_Cron_Model_Observer::dispatch() when this evaluates to true $time < $now - $scheduleLifetime ($time is the time set for the cron and $scheduleLifetime is the value you set in the backend for Missed if Not Run Within in the cron configuration). Try increasing the lifetime or move your cron to an other hour. Also you can see what's taking that long in the other cron and fix it :). – Marius May 7 '14 at 11:52
  • Also the schedule is not generated automatically. – Alex May 7 '14 at 12:03
  • I've also seen this fail due to php fatals - are you logging them? – kalenjordan May 7 '14 at 17:22
2

So this question would have an answer....

The problem is most probably caused by a cron that takes too long.
And other cronjobs that should run after the "long one" do not get scheduled because it's too late to schedule them.

The error message comes from Mage_Cron_Model_Observer::dispatch(), when this evaluates to true $time < $now - $scheduleLifetime ($time is the time set for the cron and $scheduleLifetime is the value you set in the backend for Missed if Not Run Within in the cron configuration). Try increasing the lifetime or move your cron to an other hour.

An other solution would be to wrap all your crons that should run close together in one single cron, and give it time to finish.

|improve this answer|||||
  • 1
    For those who don't know, the setting he's talking about here is in System > Configuration > System > Cron (Scheduled Tasks). – Tyler V. Sep 5 '14 at 23:17

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.