I am trying to start the cronjob via shell, as it does not execute via crontab.

When I type php5 cron.php The output is only

X-Powered-By: PHP/5.5.26
Content-type: text/html

And no jobs are beeing executed.

What am I doing wrong?

1 Answer 1


You are not using the CLI version of PHP. Ask your hoster which command to use or if you want to try finding it yourself, type:

ls -l `which php5`

which shows you where php5 is located and if it is a symlink. then look in the directory (or the directory of the symlink) if you can find something like php5-cli

Also, you should specify the mode like this:

php cron.php -mdefault
php cron.php -malways

Otherwise, cron.php starts cron.sh which then spawns cron.php again with both variations. Also it redirects all output to /dev/null.

I strongly recommend using the alternative cron runner from Aoe_Scheduler which gives you much more control and information. Also it explains you exactly how to set up the system cronjob.

  • I tried /usr/local/.../bin/php-cli cron.php -mdefault and I get back: Parse error: syntax error, unexpected T_OBJECT_OPERATOR in /home/.../cron.php on line 43which is Mage::app('admin')->setUseSessionInUrl(false); The funny thing is, that everything worked well before the 1.9.2 update. Commented Jul 20, 2015 at 16:28
  • 2
    I resolved it now by adding -mdefault to the php5-5.5 command. Commented Jul 20, 2015 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.