cancel
Showing results for 
Search instead for 
Did you mean: 

Cronjob error also Heartbeat not found

Cronjob error also Heartbeat not found

Hello, when i run the Tasks :

* * * * * /bin/bash /home/soulexhi/public_html/scheduler_cron.sh --mode always
* * * * * /bin/bash /home/soulexhi/public_html/scheduler_cron.sh --mode default

As per Cron Scheduler tells me to i am getting this error message via Email

HELP!!

 

X-Powered-By: PHP/5.6.12

Content-type: text/html; charset=UTF-8

 

<br />

<b>Warning</b>:  require_once(/abstract.php): failed to open stream: No such file or directory in <b>/home/soulexhi/public_html/shell/scheduler.php</b> on line <b>3</b><br /> <br /> <b>Fatal error</b>:  require_once(): Failed opening required '/abstract.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in <b>/home/soulexhi/public_html/shell/scheduler.php</b> on line <b>3</b><br />

6 REPLIES 6

Re: Cronjob error also Heartbeat not found

Does anyone have any idea?

Re: Cronjob error also Heartbeat not found

At the beginning of the file 'magento_root/shell/scheduler.php' there is a require_once that I changed to the following to gets rid of the error and successfully completes running the script, however I still get no heartbeat found:

 

 

if (!empty($_SERVER['SCRIPT_NAME']))
        require_once dirname($_SERVER['SCRIPT_NAME']) . DIRECTORY_SEPARATOR . 'abstract.php';
else
        require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'abstract.php';

 

Re: Cronjob error also Heartbeat not found

Did not work

Re: Cronjob error also Heartbeat not found

Solved: It was the PHP version of Cron Jobs.

The PHP version was set correctly for the site which is why it was working; however Cron Jobs was running at server native PHP 5.3 which is why I was getting the errors only when running Cron. I updated to version 5.5.

 

Changed Cron command:

php /home/mydomainname/public_html/cron.php
to
php55 /home/mydomainname/public_html/cron.php

in cron.php

$isShellDisabled = (stripos(PHP_OS, 'win') === false) ? $isShellDisabled : true;


After this line, add:

$isShellDisabled = true;

Re: Cronjob error also Heartbeat not found

This is what worked in my case.

Using crontab config as per setup instructions of aoe scheduler.

Remove directory separator from line 3 of shell/scheduler.php.

 

Change this:

require_once dirname($_SERVER['SCRIPT_NAME']) . DIRECTORY_SEPARATOR . 'abstract.php';


To this:

require_once dirname($_SERVER['SCRIPT_NAME']) . 'abstract.php';

Re: Cronjob error also Heartbeat not found

Thank you Mage34's answer worked for me. Cheers!