Typically, by creating a script that does this and then adding a line to your system's crontab (or equivalent scheduling utility) that invokes your script ever hour, or as you desire.
(I'm not sure I fully understood the question -- more context would be welcome...)