Is there a way to execute php code once an hour independent of page views.
Yes. You should be able to use a crontable on Linux (and any *nix, I think), or the Task Scheduler on Windows.
do i jsut write the code as i normally would and set it up in the task scheduler.
Yes.
Task Scheduled / Cronjob simply executes the file every hour, as if you were doing it yourself.
Or if all else fails, use php and a java refresher set to an hour. Keep a time stamp just in case refresh fails or something. and keep that window open.