Hi Guys
I want to send mail after specific time
Actually I want to send mail after 23 hour from the specific date
Now I am using java.util.TimerTask Thread to call that email function
Please help me..
Thanks
Hi Guys
I want to send mail after specific time
Actually I want to send mail after 23 hour from the specific date
Now I am using java.util.TimerTask Thread to call that email function
Please help me..
Thanks
Have you tried to use something like QuartZ Scheduler which will help manage scheduling and executing tasks: http://www.quartz-scheduler.org/
The combination of Timer and TimerTask should suffice. The Timer class has a schedule() method. Just pass the TimerTask and a Date representing today plus 23 hours along it.
Timer timer = new Timer(true);
timer.schedule(new MailTask(), todayPlus23hours);
where the MailTask look like this:
public class MailTask extends TimerTask {
    public void run() {
        // Implement.
    }
}