cancel
Showing results for 
Search instead for 
Did you mean: 

Cron / Cronjob Heartbeat not working / executing

SOLVED

Cron / Cronjob Heartbeat not working / executing

Hi Forum goers, 

 

First off, I'd like to thank those taking the time that's going through my support request / message.

I would also like to state upfront that my knowledge with the Magento environment is very limited - naturally even more so with Cron Jobs that are meant to execute Magento queues.

 

The problem:

The 'queue' is not being executed as reported by the 'AOE Scheduler' addon/module. Therefore, purchase emails are not being sent and tasks are not being executed.
Topics that are describing the same situation, or which are similar, and links/sources that I have followed prior to this post:
Forum Topic 1
Forum Topic 2

Information source 1

Specifications:
- I am running the AOE Scheduler addon/module.

- Magento version 1.9.2.1.

- Website URL: http://buyrightnow.co.za.

- cPanel does allow for Cron Job Executions (However, they are limited to running once every 2 hours at the most).

- Host: Hetzner (Running on a Linux server I believe), with phpmyadmin capability (and the latest PHP version).


The website configuration:

Please see the attached screenshots for information on how the queue, schedules and heartbeat is configured:

 

Heartbeat error:

error description

 

Tasks are being run when 'run now' is executed from the Schedule Configuration (and not from the automated Cron Job, note that the last heartbeat had been 55 minutes ago at that time):


 

The configuration (from both Magento and the hosting cPanel Cronjob Manager):

 

It is important to note that the hosting only allows for Cron Jobs to be executed at most once every 2 hours. From comments that I have read, this could be an issue? Would I not be able to simply set up the Cron Job to execute once every 2 hours?
If this is impossible, would it mean that Cron Jobs simply will not work on the current host for Magento?

Furthermore, as you can see from the screenshot of the cPanel above, it has been set up. However - it never executes the queue, nor does it create new schedules.

Lastly, please note that I have tried using different command types for execution - none of which rendered different results.

If you have any information on this... please do get back to me. I thank you greatly for it.

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Cron / Cronjob Heartbeat not working / executing

I've googled the issue and found many people suggesting that I add a code line to my cron.php file.

$isShellDisabled = true;

 

I've added it, and spoken with my host. It seems like my issue has been resolved.

View solution in original post

5 REPLIES 5

Re: Cron / Cronjob Heartbeat not working / executing

Also please note that I have tried variations of time configurations for testing purposes. None have executed the queue automatically.

Considering that the host only allows one execution of the cron job every 2 hours, I have tried inputting the following values and higher as well without success (cron configuration):

Generate Schedules Every: 120
Schedule Ahead for: 120
Missed if Not Run Within: 120
History Cleanup Every: 120
Success History Lifetime: 120
Failure History Lifetime: 120
Mark jobs as failed after: 150
Heartbeat task schedule (cron syntax): 00 */2 * * * (and * */2 * * *)


Re: Cron / Cronjob Heartbeat not working / executing

Hi,

I think the settings may be server dependent - I've had different experiences w/ different hosts.

 

Here are my working settings from Mage CE 1.9.2.2 

 

Generate Schedules Every 15

Schedule Ahead for 20 

Missed if Not Run Within 15

History Cleanup Every 10

Success History Lifetime 60

Failure History Lifetime 600

Mark job as failed after 120

Maximum job runtime

Heartbeat task schedule (cron syntax)  */5 * * * *

 

Your host's 2 hour cron limit is pretty poor, esp. as Mage 1.9.1+ uses the cron to send out New Order emails.

 

Cheers

Re: Cron / Cronjob Heartbeat not working / executing

Thank you for the reply freshwebs.

Do you mean that I should try those values?

I've tried a number of different values, default included. None have worked unfortunately.

I'm not entirely sure but, if the "Missed if Not Run Within" setting is set to a value lower than 120, wouldn't that just mark all queue items as missed, since the queue would only get executed once every 120 minutes?

Re: Cron / Cronjob Heartbeat not working / executing

I've googled the issue and found many people suggesting that I add a code line to my cron.php file.

$isShellDisabled = true;

 

I've added it, and spoken with my host. It seems like my issue has been resolved.

Re: Cron / Cronjob Heartbeat not working / executing

I having the same problem.

 

I had tried with the solution given here. But still nothing resolved and having same problem.

 

Can anyone help me on this?