Comments (9)
Please describe your environment. Grails version, the plugin version, application server.
from grails-quartz.
I'm confused, I don't think the plugin has responsibility to do this on exit. Many/most people want the jobs to outlive the app, if the app crashes or restarted the jobs should still be in quartz so they can be recovered? Or is this specifically happening for non-persistent or durable jobs?
from grails-quartz.
@kefirfromperm - apologies. Grails 2.5.1 on Mac OS X 10.10 Java 8 - tomcat 7.0.55.3.
@rvanderwerf - its quite possible, I'm not super familiar with Quartz at this stage - however - if this is the case (the jobs should outlive the application) - how can I detect from within the job that the application is no longer running so it can shut itself down. Using grails run-app / stop-app I would expect it to stop jobs, but I may be wrong. I've also noticed when deploying with Tomcat manager it won't allow the new versions to take over as the old versions will not stop jobs.
from grails-quartz.
I'd up to the app code to manage this. You have to query jobs and triggers using the quartz API and clean them out if you don't want them anymore. If you do a nice stop, you can add this to your shutdown code as well. Quartz doesn't really provide any auto-management of this out of the box.
from grails-quartz.
@rvanderwerf OK. Do you have any examples of doing this? I've tried adding blocks of code in the BootStrap destroy methods as well as the onShutdown in plugins config but neither of these methods appear to be triggered at application exit.
from grails-quartz.
Just checking in here if anyone can assist with this?
from grails-quartz.
@donald-jackson - did you ever get past this? I'm hitting the same problem.
Maybe I'm misunderstanding the entire purpose of the plugin - it seems to bundle quartz and allow it to autostart. if I'm also then stopping the app, I'd want this to cleanly shut down.
from grails-quartz.
@mgkimsal unfortunately not, I still have the problem I just use other methods to hard-stop my application now as I'm unable to stop these jobs programmitically or automatically.
from grails-quartz.
resolved in 2.0.10
from grails-quartz.
Related Issues (20)
- "No Session found for current thread" for job listener
- Conflicting bean HOT 1
- Race condition with dataSource on startup HOT 1
- Broken links in Grails plugin page
- How to configure multiple schedulers to have more than one thread pool?
- version 2.0.13 is not working with Grails 4.0.0.M2 HOT 6
- java -jar run xxx.jar not working HOT 1
- Version 2.0.13 not compatible with Groovy 3 HOT 1
- The trigger configuration stored in the database is reset after application restart
- Plugin Prevents application to startup with a job in past date
- Timezone parameter is ignored
- Long time running jobs
- Plugin is not working with Grails 5 HOT 7
- How to disable quartz in unit tests ?
- 'grails create-job' command does not exist in grails 6
- When I set autoStartup to false the job does not work HOT 1
- Set-up GitHub Workflows HOT 1
- Verify all the tests are up-to-date and green (passing) HOT 1
- Review Documentation and update accordingly
- Could not instantiate custom Metaclass for class: grails.plugins.quartz.QuartzJob$Trait$Helper HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grails-quartz.