Created
January 13, 2016 13:45
-
-
Save sujaypillai/4458356032132577ca5a to your computer and use it in GitHub Desktop.
TriggerQuartzJob
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ctxt, scheduler; | |
// get Spring context and Quartz scheduler | |
ctxt = Packages.org.springframework.web.context.ContextLoader.getCurrentWebApplicationContext(); | |
scheduler = ctxt.getBean('schedulerFactory', Packages.org.quartz.Scheduler); | |
// fire (unless explicitly defined in Job detail Spring bean, scheduler group is always DEFAULT) | |
scheduler.triggerJob('<insertJobName>', 'DEFAULT'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment