Moving files after x hours

I’d like to move a file from my /temp/ directory to a /files/ directory every, say, 8 hours. I’ve been reading up on the php sleep and sleep_until functions, but I don’t think those are what I’m looking for.

Is this possible in php or will I have to use some other language? If there’s something I’m missing, I’d be grateful for someone to point me in the right direction. Thanks!

One option that is open depending on the server is the use of cron jobs, the cron job would run a specified script at the specified intervals.