1

My website has this cron job set to run every 30 mins and the cron.php/sh is set to run every 15 mins on the server. But I always get "missed" for this cron job. My cron configuration time setting is:

15 45 60 60 3000 3000

Also, I have noticed that every now and again we got the message (from aoe scheduler) saying "last heartbeat is older than *** (more than 15) mins" even more than an hour sometimes. Does this mean the cron.php/sh is not running properly? Hence the cron job is "missed"?

Please kindly advise!! Many Thanks!

  • were you able to figure this out? – dchayka Oct 24 '16 at 14:44
3

Please Try This

It looks like you're using the default Magento cron.

If you want the AOE Scheduler to work you need to use the scheduler's cron instead - e.g.:

*/5 * * * * /bin/sh -f /home/cpanel_user/public_html/scheduler_cron.sh

FYI - the "heartbeat" task is a very lightweight cron job that runs every time, simply reporting that the scheduler is running. If your message is showing you that the heartbeat couldn't be found it likely means either that your cron isn't configured correctly, or there's a lock in place. You can try removing var/locks and the scheduler's lock which normally lives in /tmp if this is the case.

Hope It's helpful for any one.

2

In Magento's admin configuration, System -> Configuration -> System under the Cron configuration you have a setting Missed if Not Run Within this by default is 15 minutes.

So based on your current cron configuration of running every 30 minutes, jobs that are due to start between 0 and 15 minutes past, and 31 and 45 minutes past the hour will be at least 15 minutes late in running. Therefore it gets skipped.

Either you can change this setting such that you have it set to a time of 30 minutes or more, so that it will run each time, or as an alternative and likely better solution, configure cron to run more frequently.

Perhaps every minute or every 4 minutes instead.

  • Thanks for the answer! This particular cron job is set for a thrid party Magento extension. From the history, they are scheduled every 30 mins and our cron.php runs every 15 mins. No issues here. But if I give you an example of scheduled time ( such as at 7:00:00) and executed time (such as 7:01:57), does this make any sense to why is it still "missed"? As any other cron jobs have the similar executed time (less than 2 min after scheduled time) and get "succsess". Does this mean maybe this thrid party extension has its own problem instead of our own Magento cron settings? Thanks again! – W Saunders May 30 '15 at 7:39
1

If your cron job only runs every 30 minutes please make sure that your setting for

System > Configuration > Advanced > System > Cron (Scheduled Tasks) > Schedule Ahead For is bigger than 30 minutes. Additionally what John said above also increase "Missed if Not Run Within" to something higher than 30.

Schedule Ahead For 45
Missed if Not Run Within 60

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.