Two Laptop Bag*
The moose likes Other Application Frameworks and the fly likes quartz scheduler Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "quartz scheduler" Watch "quartz scheduler" New topic
Author

quartz scheduler

vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
Hello,

I written a quartz scheduler using the spring framework. What I want to know is that how should I keep the scheduler up and running all the time? The scheduler will start when I run the java application and is kept alive as long as the app is not shut down. But then what if the server that hosts this application suddenly dies down due to power surge and other possible mayhems? Is it possible to automatic restart the application when the server is restarted?

FYI the app is going to be hosted on both windows and unix server. Thanks in advance.


I'm not available, my BF's name is WORK.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Is this a web application ? If so, maybe you could use the ContextLoaderListener and set the SchedulerFactoryBean to be instanciated at startup.


[My Blog]
All roads lead to JavaRanch
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
it's not a web application actually. A client server app. I was wondering what can I do to prevent the scheduler going "off-schedule" if something like blackout that might disrupt the scheduler.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

The scheduler will be back on when your Spring application starts again. So the problem seems more related to how your program is going to restart. Like kicking it at Windows' startup. It doesn't seem to be a Spring related problem, does it ?
vivien siu
Ranch Hand

Joined: Nov 10, 2005
Posts: 143
actually it's a standalone application. So how can I restart it back automatically? Is it even possible? Coz it's always like "oh shit the job's not running because of power surge blah blah blah, we have to restart it back" (the It support said).
 
Consider Paul's rocket mass heater.
 
subject: quartz scheduler