I'm using CodeIgniter for my project. I have this roadblock in from of me..
There's this method in my controller that I want to call every hour. Let's have that as:
class Notifs extends CI_Controller {
public function __construct() {
parent:: __construct();
// load stuff here
}
public function index() {
}
/* I want to call this function on an hourly basis */
public function check_overdue_stuffs() {
// do the checking here
}
}
I have absolutely no idea on how to implement this. I have tried using sleep($seconds)
but that was just a mess.
Any ideas for a perfectly awesome way to do this? A verbose example would be great. Thanks!