Anjaneyulu
Anjaneyulu

Reputation: 71

How to use timer in a thread

I would like to send email notifications to users of my project exactly at 8 a.m, Here we are using a thread to send emails to the user. I would like to send some emails exactly at 8 A.M. How can I execute that perticular logic in this Thread. Please help me.

Upvotes: 1

Views: 224

Answers (1)

btreat
btreat

Reputation: 1554

The java ScheduledExecutorService should be helpful here.

http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ScheduledExecutorService.html

Upvotes: 1

Related Questions