Alex Rivera | Logout

How to run a task daily from Java?

Asked 2009-09-30T15:22:28.700
11

How can I run a task daily at a specified time (say 11:00 am) using java.util.Timer? I'm using JDK 1.4.2, I know it's old, but it's what the project requires.

Edit
Report

1 Answer

0

Maybe, that recent post helps you:

Will this pause my Java thread for a minute?

My response for that question is use a java built in implementation based on java.util.Time and java.util.TimerTask classes: Will this pause my Java thread for a minute?

Or, you can use the crontab service for *nix platforms (available for Windows platforms too). That's the simplest and light-weight style to run a standalone job periodically.

[]'s,

And Past

answered 2009-09-30T15:37:00.487

Your Answer