This is pretty straight forward, but don't look to just keeping it in your PHP code. You need to use a cronjob script (linux) or windows equivalent (on the server where your software lives).
Here is a simple cron you would add to pull a specific cli method:
# hourly cron
0 * * * * php /www/ciWebsite/index.php [controller] [method] >/dev/null 2>&1
That way, it runs the controller + method you want and output is dumped into /dev/null
Try running /www/ciWebsite/index.php notifs check_overdue_stuff
and see if it works (obviously update your path)
edit:
- fixed an extra entry (I had cli = folder + controller + method)