I need to create an eternal process (thread?) that will run on the server and will scan a database to see if certain things should be done. this process should be in a pretty low priority.
any ideas/links about what I should do to implement this?
We must know, we will know. -- David Hilbert
posted 10 years ago
You can use the Timer class in the library to run a task at scheduled times. Timer is a normal Java thread with a loop in the run() method and it can be set to never end. It would be nice to have a clean way to terminate it. Ctrl-C works, but a UI or a remote interface - eg a socket protocol - would be better.
I have no idea what your skills are. Does this sound fun or a bit daunting or like I'm not speaking English? Don't be afraid to ask for more detail. If you haven't used Timer before, try to make something that just says "Hello" every 20 seconds and see how it all works.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi