0

I have used java.util.Timer to schedule TimerTask to be run every 2 hours .

But how do I schedule a task to run say everynight at 2 am ?

This might be something easy, I am just overlooking something I guess.

Thanks in Advance

2 Answers 2

2

You could use the Quartz scheduling system with a CronTrigger.

Sign up to request clarification or add additional context in comments.

Comments

1

Call

timer.scheduleAtFixedRate(task, twoAmDate, twentyFourHoursInMillis )

on java.util.Timer

1 Comment

Yes, see java.sun.com/javase/6/docs/api/java/util/…, java.util.Date, long)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.