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 />
Does anyone have any idea?
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';
Did not work
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;
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';
Thank you Mage34's answer worked for me. Cheers!