Cron Job |
Hi friends
How to call controller and action using cron job? my cron action's absolute path is below /[FOLDER_NAME]/[USERNAME]/public_html/index.php/[CONTROLLER_CRON]/[CONTROLLER_ACTION] If I set above path in cpanel cron job task than server return path not found error, and also I have created one test file on root than server give permission error. I am using bluehost shared hosting server Sorry for my bad English ,please help me
see the doc http://www.codeigniter.com/user_guide/general/cli.html
example.com/index.php/tools/message/to -> $ cd /path/to/project; $ php index.php tools message "John" OR $ php /path/to/project/index.php tools message "John"
Thanks to all for valuable reply.
And below code is working for me. CI uses CLI requests. Means you have to use PHP CLI to use this cron job properly. From SSH in crontab view it should be similar to: /usr/bin/php-cli /home/[CPANEL_USER]/public_html/index.php [CONTROLLER_NAME] [METHOD_NAME] |
Welcome Guest, Not a member yet? Register Sign In |