In my application i need to set cron job for daily updation. I am using CodeIgniter 3.0
My config.php file
$config['index_page'] = '';
$config['uri_protocol'] = 'AUTO';
Here is my controller
class Cron extends CI_Controller {
public function cron_job(){
if (!$this->input->is_cli_request()){
echo 'test';
//show_error('Direct access is not allowed');
}
else{
echo 'call';
}
}
}
and i have set path in cpenal like
/usr/bin/php /home/public_html/my_app/index.php cron cron_job
But this return html of login page which is also front page of app. I think there is issue with path, So how can i fix it?