I added this line to crontab on our server
*/5 * * * * /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
but Aoe_Scheduler said last cron success was few month ago
What should I do to make cron is working?
croncrontab
I added this line to crontab on our server
*/5 * * * * /home/users/mydomain/www/cron.sh >> /home/users/mydomain/www/var/log/cron.log 2>&1
but Aoe_Scheduler said last cron success was few month ago
What should I do to make cron is working?
Best Answer
cron.sh
by Magento has some issues. It spawns two processes, basicallyphp cron.php -mdefault
andphp cron.php -malways
, while STDERR is redirected to/dev/null
(i.e. any error messages are swallowed).So it is safer to set up the cron like this:
However, you said you have
Aoe_Scheduler
installed. This extension comes with a drop in replacement forcron.sh
that enables additional features in the cron management like process monitoring. The file isscheduler_cron.sh
and you find instructions how to set it up in the "Scheduler" menu of the Magento admin panel (assuming you have version 1.x, or at least 0.4 of the extension - if not, update, it's worth it!)