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

Timer vs Quartz  RSS feed

 
prabhu das
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which is the better one to use java.Timer or Quartz scheduler?
I want my run my main method indefinitely.
can please send me some examples
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If a method should not return, then don't return from it - wrap it inside "while (true) { ... }". Or, better, start a new thread that does this, then you can safely exit from the main method.

I don't see how Timer or Quartz would help with this.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!