How do I run some php function in controller every 1 hour using cPanel Cron Jobs?
Note: for testing reasons, I decided to execute this function every 1 minute.
Example:
class Mycontroller extends CI_Controller {
public function index() {
//something
}
/* HERE IS IT*/
function clear_ip_address_list_every_one_hour(){
$data['ip_adress] = '0'; // set to 0
$this->my_model->model_function_to_action($data);
}
} // end of class
I want clear_ip_address_list_every_one_hour()
to execute every one minute.