keerthi keerthi - 3 months ago 21
PHP Question

How to run a cron job in codeigniter without using wget?

I want to run a cron job without using wget in code-igniter.
Am used like this

*/1 * * * * wget http://assurance.com/controller/function


It works successfully. But I am not interested to use wget.

Is there any another way to run this cod-igniter script?

Answer

You can try and use something like this:

* * * * * /usr/bin/php  /pathToTheApp/controller/function

But of course the /usr/bin/php should be your path to the PHP binaries and pathToTheApp should be the absolute path to your CI application.

Comments