[Logo] Terracotta Discussion Forums (LEGACY READ-ONLY ARCHIVE)
  [Search] Search   [Recent Topics] Recent Topics   [Members]  Member Listing   [Groups] Back to home page 
[Register] Register / 
[Login] Login 
[Expert]
Re-Scheduling After an Exception  XML
Forum Index -> Quartz
Author Message
sic

neo

Joined: 11/23/2009 08:11:07
Messages: 1
Offline

Hello,

Actualy i dont know if this has been asked before, but is there any way to re-schedule a job after a JobExcecutionException?

i have a job that runs everyday at 7:00, but sometimes the server is down, or the data is not ready, so i want the job to wait 5 min before its runs again, in either cases it throws an exception, and i catch the Exception and throws an JobExecutionException with the RefireImmediately to true, is there a way to make the job wait x time before it will be refired ?

Tks in advance

jhouse

seraphim
[Avatar]
Joined: 11/06/2009 15:29:56
Messages: 1703
Offline


There are so many possible behaviors for such situations that Quartz does not currently offer any for free.

It should be very easy to do this manually within the job itself. -- The JobExecutionContext passed to the job has a handle to the scheduler, jobdetail and trigger. You can simply make a new trigger, name the running job, and call scheduler.scheduleJob().

james
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team