Manual Execution of Jobs setup in Scheduler

View: New views
3 Messages — Rating Filter:   Alert me  

Manual Execution of Jobs setup in Scheduler

by Peagmaguice :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I have been trying to figure out a simple way of executing a specific registered Job or Trigger setup in StdScheduler manually.

I have a number of jobs configured in our application and appropriate triggers created for all of them.  However, I have created a web page where I want these jobs (in the manner they were configured) to be executed manually when prompted.

I can use Scheduler.getTrigger() or Scheduler.getJobDetail(), but lack the understanding on how I can get the Job itself to run the execute method with the appropriate JobExecutionContext.

Any suggestions?

Thanks,

Kory
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=394679&messageID=481731#481731


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Manual Execution of Jobs setup in Scheduler

by Peagmaguice :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
                        scheduler.triggerJob(jobName, "DEFAULT");

You job class is implementing JobExecutionContext, right?
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=394679&messageID=481756#481756


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Manual Execution of Jobs setup in Scheduler

by Peagmaguice :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Thanks, Michael

I can't believe I missed the triggerJob method even while pouring over the JavaDocs for Scheduler for hours...
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=394679&messageID=481896#481896


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price