Spring Managed Schedulers Status -
is there way check list of schedulers managed in spring application context? have application have configured quartz scheduler , want check whether scheduler active ( not mean scheduler executing job). checking whether web resource active calling url of web resource , checking response (200 or 404).
thanks.
depending on needs may 1 of following:
- if need check during application startup, can check logs. quartz logs when starts. need configure logger have "org.springframework.scheduling.quartz" namespace logged in debug mode
- to check anytime if scheduler started, can use quartz jmx capabilities. enable adding "org.quartz.scheduler.jmx.export = true" in quartz properties file. can open jconsole targeting application, , when opens, there available "quartz" node underneath find various attributes , operations. first 1 "started" true if scheduler started asked, there many others too
if not know how open jconsole, consult sun's documentation @ https://docs.oracle.com/javase/7/docs/technotes/guides/management/jconsole.html different topic , describe here
- you may have access such information programmatically too, injecting scheduler bean wish access from, , calling scheduler.isstarted() method. way have implement way exposes information on demand somehow
- in case use quartz database, have option check inside qrtz_scheduler_state table checkin times change every few seconds if scheduler running
Comments
Post a Comment