• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eternal process

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

I need in my app something like an eternal process that will run on the server in a quite low priority. I will not have to initialize it, or maybe only once when I restart tomcat.

I am not sure how it should be done in Java.

When it is invoked it should keep on scanning the database for records with dates that have already passed, do something (send an email), set the record's date to some time in the future (according to additional data found in this record), and continue to scan other records... or go to sleep for a while...

Could you please give me some info about how it should be done on a Java server (Tomcat) and what terms should I look into. Should I use daemons?

Thanks, Joseph.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64721
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have given the textbook definition of a daemon.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.

What do you think about java.util.TimerTask

or Quartz ???

Job Scheduling in Java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic