This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Execute Block of code using core java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Execute Block of code using core java" Watch "Execute Block of code using core java" New topic
Author

Execute Block of code using core java

aresh babu
Ranch Hand

Joined: Aug 31, 2008
Posts: 65
Hi,

i have a requirement that i need to execute a block of code for every 30minutes using core java only.Please let me know how can i do it?

Thanks in advance.

Regards
Aresh
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18499
    
  40


For one task.... try java.util.Timer

For many tasks, and more complex requirements... try java.util.concurrent.ScheduledThreadPoolExecutor


Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
 
 
subject: Execute Block of code using core java
 
Similar Threads
i want excute top command in linux using java
return of the try-catch
To enable landscape finish for taking printout using java script
Purpose of Finally Block
integer command line arguments?