Quartz setting on Corn triggers to wait for the job to be completed before?

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

Quartz setting on Corn triggers to wait for the job to be completed before?

by mcnoche :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I am new to Quartz, using the version 1.6.0 for a web application deployed under Tomcat 6.0

My question about Cron Triggers and Job associated with them. If I schedule a Job with corn trigger to execute every 20 seconds daily. And for example if this job fired and it takes say more than 20 seconds to complete it's job. I noticed that Quartz fires of the same job again (I understand since it is a corn trigger) after 20 seconds even though the first instance of the job is executing.

 Is there any way to restrict this to happen. To make sure that quartz fire the corn job only if the previous instance of the job got completed and done with it.

----Log messages to explain the scenario in detail----
2008-07-24 17:49:35,171 [INFO ] Quartz_Worker-1 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 fired job group1.job1 at:  17:49:35 07/24/2008
2008-07-24 17:49:35,171 [INFO ] Quartz_Worker-1 # - QuartzJob - ....Starting the job to execute.... -[b]3510722429080509114[/b]---->1216936175171
2008-07-24 17:49:40,046 [INFO ] Quartz_Worker-2 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 fired job group1.job1 at:  17:49:40 07/24/2008
2008-07-24 17:49:40,046 [INFO ] Quartz_Worker-2 # - QuartzJob - ....Starting the job to execute.... -[b]745078671482952352[/b]---->1216936180046
2008-07-24 17:50:00,046 [INFO ] Quartz_Worker-3 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 fired job group1.job1 at:  17:50:00 07/24/2008
2008-07-24 17:50:00,046 [INFO ] Quartz_Worker-3 # - QuartzJob - ....Starting the job to execute.... -[b]233322494343638598[/b]---->1216936200046
2008-07-24 17:50:15,171 [INFO ] Quartz_Worker-1 # - QuartzJob - ....Quiting the job....--[b]3510722429080509114[/b]---->1216936215171
2008-07-24 17:50:15,171 [INFO ] Quartz_Worker-1 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 completed firing job group1.job1 at  17:50:15 07/24/2008 with resulting trigger instruction code: DO NOTHING
2008-07-24 17:50:20,031 [INFO ] Quartz_Worker-1 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 fired job group1.job1 at:  17:50:20 07/24/2008
2008-07-24 17:50:20,031 [INFO ] Quartz_Worker-1 # - QuartzJob - ....Starting the job to execute.... -[b]3074525961200561586[/b]---->1216936220031
2008-07-24 17:50:20,046 [INFO ] Quartz_Worker-2 # - QuartzJob - ....Quiting the job....--[b]745078671482952352[/b]---->1216936220046
2008-07-24 17:50:20,046 [INFO ] Quartz_Worker-2 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 completed firing job group1.job1 at  17:50:20 07/24/2008 with resulting trigger instruction code: DO NOTHING
2008-07-24 17:50:40,031 [INFO ] Quartz_Worker-2 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 fired job group1.job1 at:  17:50:40 07/24/2008
2008-07-24 17:50:40,031 [INFO ] Quartz_Worker-2 # - QuartzJob - ....Starting the job to execute.... -[b]5206506958801272240[/b]---->1216936240031
2008-07-24 17:50:40,046 [INFO ] Quartz_Worker-3 # - QuartzJob - ....Quiting the job....-[b]233322494343638598[/b]---->1216936240046
2008-07-24 17:50:40,046 [INFO ] Quartz_Worker-3 # - LoggingTriggerHistoryPlugin - Trigger group1.trigger1 completed firing job group1.job1 at  17:50:40 07/24/2008 with resulting trigger instruction code: DO NOTHING


Thanks in advance
Rakesh
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=402073&messageID=489372#489372


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


Re: Quartz setting on Corn triggers to wait for the job to be completed before?

by mcnoche :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Have your job implement the StatefulJob interface. StatefulJob cannot have multiple or concurrent instances running at the same time.
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=402073&messageID=489486#489486


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


Re: Quartz setting on Corn triggers to wait for the job to be completed before?

by mcnoche :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

No, I did not tried this option yet.

Thanks for the answer.

Rakesh
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=402073&messageID=490176#490176


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