If it's available to you, then it's difficult to think of a reason not to use the Java 5 executor framework. Calling:
ScheduledExecutorService ex = Executors.newSingleThreadScheduledExecutor();
will give you a ScheduledExecutorService with similar functionality to Timer (i.e. it will be single-threaded) and but whose access may be slightly more scalable (under the hood, it uses concurrent structures rather than complete synchronization as with the Timer class). Using a ScheduledExecutorService also gives you advantages such as:
- you can customise it if need be (see the newScheduledThreadPoolExecutor() or the ScheduledThreadPoolExecutor class)
- the 'one off' executions can return results
About the only reasons for sticking to Timer I can think of are:
- it is available pre Java 5
- a similar class is provided in J2ME, which could make porting your application easier (but it wouldn't be terribly difficult to add a common layer of abstraction in this case)