How to run a cron job on a CodeIgniter controller that all the URL does is run a query from an API, update the DB & send emails (from within CI)?
问题 I have a web application that runs a query on an api, gets new information, changes the variables in the database and sends emails if needed (compares old and new variables). I work with Ubuntu Server, and I tried several variations to run this. my controller looks like this: class Cli_only extends CI_Controller { public function __construct() { parent::__construct(); is_cli() OR show_404(); // If cronjob ! $this->load->model('kas_model'); // Sets the server not to have a time out. ini_set(