How to set cron job url for codeigniter?

I have used below cron

php /full-path-to-cron-file/cron.php /test/index

source: http://www.asim.pk/2009/05/14/creating-and-installing-crontabs-using-codeigniter/

This works for me.

Thanks to all


Use:

php index.php welcome show

as command in your crontab. E.g.:

0 * * * * php /home/username/index.php welcome show

Source (ver. 2.2.0) http://www.codeigniter.com/userguide2/general/cli.html

Source (ver. 3.*) http://www.codeigniter.com/user_guide/general/cli.html

Source (ver. 4.*) http://codeigniter.com/user_guide/cli/cli.html