After updating Magento, the cron job stopped working. The cron_schedule table doesn't get updated ("executed_at" and "finished_at" remain NULL past "scheduled_at" time).
I'm able to execute cron.php manually via SSH but not via cPanel cron. Any ideas?
Solved! Go to Solution.
Update:
I found a solution in another post Not receiving order notification email Magento v1.9.1.1. In cron.php
Open up the cron.php file in your Magento root directory (usually "public_html") and look for the following line of codes:
$isShellDisabled = (stripos(PHP_OS, ‘win’) === false) ? $isShellDisabled : true;
Add the following codes in a new line exactly after the above line of codes:
$isShellDisabled = true;
Now it works
Update:
I found a solution in another post Not receiving order notification email Magento v1.9.1.1. In cron.php
Open up the cron.php file in your Magento root directory (usually "public_html") and look for the following line of codes:
$isShellDisabled = (stripos(PHP_OS, ‘win’) === false) ? $isShellDisabled : true;
Add the following codes in a new line exactly after the above line of codes:
$isShellDisabled = true;
Now it works
Generally you shouldn't run cron.php as a cron job and should instead use cron.sh. Shell disabling is kind of last resort approach (Windows server, or something like it ...)
Hai,
Iam a beiginner in magento . In my website the cron jobs are not working . When i send a newsletter via que its not sendin any mails to sybscribers . And the product alert mail function is not working . Iam using the Magento version 1.9.1.1 .
website Url : http://globalsocialcenter.com/
My cron job path is
*/15 | * | * | * | * | /usr/local/bin/php -q /home/globalsoc/public_html/cron.sh |
/usr/local/bin/php -q /home/globalsoc/public_html/cron.sh
What you're trying to do is to use PHP to execute Bash script. Needless to say it doesn't work. And what is this -q option anyway?
You could try something like that instead: /bin/sh /home/globalsoc/public_html/cron.sh but this command is kind of system specific.