Creating cronjob in codeigniter on linux hosting server
Calling a CodeIgniter controller from cron
Cronjob in Codeigniter
Call this from your cpanel/cron manager as follows (I added more ways to call it):
0 0 0 0 0 php-cli /home/your_site_user/public_html/index.php cron updateAge
0 0 0 0 0 wget http://your_site_url/cron/updateAge
0 0 0 0 0 /usr/bin/php /home/your_site_user/public_html/index.php cron updateAge
In my case:
wget thing is working on plesk and cpanel (wget creating files on server in your root directory).
php-cli works on plesk and cpanel both.
This modified text is an extract of the original Stack Overflow Documentation created by following contributors
and released under CC BY-SA 3.0