Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Execute Block of code using core java  RSS feed

 
aresh babu
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 22846
119
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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

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


Henry
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!