Jun 052009

Cron is very useful tool in linux to made scheduler task for general purpose, like backup data, script execution and others.

The most used crontab under linux is for executing PHP script, but sometimes this crontab is not running well. Its happen because php CLI (Command Line Interface) is not installed in your file server.

You can test this php CLI command via console, by typing

php /var/www/some-script.php

and if php CLI not installed yet, you should get an error message like this

The program ‘php’ is currently not installed. You can install it by typing:
apt-get install php5-cli
bash: php: command not found


To fix this you must install it first by typing ‘apt-get install php5-cli’ (without quotes). Wait until the process is done and you can run crontab to executing your PHP scripts. ;-)

  3 Responses to “Crontab PHP under Linux not running?”

  1. I really like your post. Does it copyright protected?

  2. my articles is free to spread but you must include original link for this article :-)

  3. How soon will you update your blog? I’m interested in reading some more information on this issue.

 Leave a Reply



You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create