Jobs that depend on each other...

896 views
Skip to first unread message

zambak

unread,
Feb 7, 2010, 11:27:20 AM2/7/10
to Quartz.NET
Hi

Is there a feature in Quartz.net where jobs can depend on each
other...
Actually, what I am looking for is a solution for following scenario:

- there are 2 jobs job1 and job2
- both jobs are scheduled to run indefinatelly
- job2 should not run unless job1 completes with a sucess code...

Is there a way to do this?

Regards
Z...

Geoff

unread,
Feb 7, 2010, 1:40:05 PM2/7/10
to Quartz.NET
Hi,

Just seen this in the FAQ:

http://quartznet.sourceforge.net/faq.html#howtochainjobs

Good luck

Geoff

Asaf Lahav

unread,
Feb 11, 2010, 10:44:10 AM2/11/10
to quar...@googlegroups.com
Hi Everybody,

I am trying to chain 3 jobs one after the other (upon successful completion).

How (using the quartz_jobs.xml file) can I configure a job chaining?
Browsing through the code I have noticed the class Quartz.Listener.JobChainingJobListener. Should I use the Quartz.Listener.JobChainingJobListener?
What is the best way to achieve that?

Asaf

Hi,

http://quartznet.sourceforge.net/faq.html#howtochainjobs

Good luck

Geoff

--
You received this message because you are subscribed to the Google Groups "Quartz.NET" group.
To post to this group, send email to quar...@googlegroups.com.
To unsubscribe from this group, send email to quartznet+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/quartznet?hl=en.

Lance

unread,
Feb 11, 2010, 5:44:20 PM2/11/10
to quar...@googlegroups.com
One way is to pass the "next job" details in as parameter(s) to the first job. Code in the first job then creates the job detail and (immediate) trigger as required. A bit messy, but it works.
 
It helps to keep in mind that Workflow is not Quartz's primary objective.
 
JobChainingJobListener is essentially a global listener that awaits completion of a given job and triggers the next job in the chain (all the jobs should be scheduled, but the chained i.e. dependent job should not have a trigger; it's trigger will be the completion of the first job).
 
Using JobChainingJobListener (as I understand it - and I may well be wrong) doesn't allow for checking of successful completion before triggering the "nest job(s)", but triggers only on completion.
 
If you do comm up with a good example or some sample code, please post it back to the group :)
 
Cheers...

Asaf Lahav

unread,
Feb 12, 2010, 5:50:05 AM2/12/10
to quar...@googlegroups.com

Can you please provide me a quartz_jobs.xml configuration sample showing how to cause the JobChainingJobListener to trigger an additional job upon completion?

 

Asaf

Swami Iyer

unread,
Feb 12, 2010, 9:15:35 AM2/12/10
to quar...@googlegroups.com
I use the JobListener which get invoked once the job is executed. The
Job that was executed would set the success/failure in the datamap and
would be read by the JobListener.

--
Thanks,
Swami

Reply all
Reply to author
Forward
0 new messages