Execute a function every hour in the background

I setup something similar. Using IIS – look into writing a .bat file which fires off a php shell script to do whatever it is you need to accomplish.

once you have that bat file working, setup a “scheduled task” in IIS http://technet.microsoft.com/en-us/library/cc721871.aspx

if you are on a linux system, then use crontab https://www.freebsd.org/doc/handbook/configtuning-cron.html

If you on a hosted, non-vps environment, then you will need to sort out how your site ISP handles this sort of task – each will be different and dependent on contracts / setup

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)