You might wish to consider the java.util.Timer & java.util.TimerTask classes. What you could do is to instantiate a Timer object & have it schedule a TimerTask object at every hour.
You could easily find out the current system time & obtain the time difference to the next hour (in milliseconds). Then all you have to do would be to invoke the scheduleAtFixedRate method. You could specify when the first task starts (by using the time difference to the next hour) as well as in what interval it should be repeated. Not forgeting to tell it what task to perform.
You'll need to extend the abstract class TimerTask & override its run method to perform that specific task you'd in mind. To decouple your task from the concrete class of TimerTask, you could write your task in a separate class & use it inside the run method.
For more information, please refer to the
Java API.
HTH.