I have to develop a java program which will run everyday at 6pm everyday. This program does some updation of the database. how to do this. Operating system is windows. it is a desktop application. Thanks.
3. Incorporate Quartz Scheduler and let it do cron-like functions. You'd normally only do this in the case where a long-running application (stand-alone or webapp) is present to house the quartz manager threads and the scheduling requirements are fairly complex.
Incidentally, one of the best ways to "hang" shutdown of a web application server is to run a scheduler inside a webapp. Until ALL threads - including the scheduler threads - are terminated, the appserver will probably not shut down. In the specific case of Tomcat, the appserver will definitely not shut down. You can remedy this by terminating the scheduler in a servlet's destroy() method,
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.
I don't even know how to spell CIA. But this tiny ad does:
a bit of art, as a gift, that will fit in a stocking