How to execute the code at particular time in java -
this question has answer here:
i have requirement saying want execute mailing code without event based on timer when specified time comes code execute , mail has send .
package com.uttara.reg; import java.util.timertask; public class timer extends timertask { @override public void run() { // todo auto-generated method stub } }
i can't understand how call timer class
could plz me out!!! in advance
you can try few things
1 : timer class
2 : timertask class
3 : quartz
4 : cron
5 : scheduler
or if have simple requirement then
step 1 : create thread time
step 2 : in thread keep
if(time_by_thread == time_want_to_execute) { //execute timer code here }
Comments
Post a Comment