How to set 1min interval time logic in java -


i stuck on 1 problem: want send useraccountname , password via mail, 1 minute interval between. is, useraccountname should go sent first via mail, , after 1 minute interval should sent too.

how implement logic 1 minute interval in java?

you can use scheduledexecutorservice. allows queue tasks given time intervals.

example

you create runnable..

runnable runnable = new runnable() {     public void run() { system.out.println("do something!"); } }  scheduledexecutorservice scheduler = executors.newscheduledthreadpool(1);  scheduler.scheduleatfixedrate() // won't tell how this! 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -