[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]
quartz CronTrigger question  XML
Forum Index -> Quartz
Author Message
legeoy

neo

Joined: 07/16/2013 23:43:41
Messages: 2
Offline

Hi~ I'm a newer to quartz and plan to use it in my project. Before using it, I have some questions and hope your help.
My project will launch many tasks periodically, some daily and some monthly. If I use CronTrigger to arrange those tasks, as the documents said "passing true into the shutdown message tells the Quartz Scheduler to wait until all jobs have completed running before returning from the method call.", the shutdown method seems to have no chance to be called and the thread will always exist, since some of my tasks should be launched daily and never to stop.
So my question is, as tasks number increase, will the threads number be a severe problem as they occupies more and more memory? Another question is if the application or computer collapsed, is it possible to recover running scheduled tasks as Crontab?
jhouse

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


shutdown(true) only waits for currently executing jobs to complete before shutdown. Not for all scheduled firings (but not yet fired) of jobs to occur.

Also, worker threads are only used for executing jobs. Jobs that are waiting for their trigger fire times to arrive are not using threads. When the job's execute method is complete, the thread returns to the pool, ready to execute the next job to have a fire time arrive.
legeoy

neo

Joined: 07/16/2013 23:43:41
Messages: 2
Offline

Thanks for your reply~ It helps me much~

jhouse wrote:

shutdown(true) only waits for currently executing jobs to complete before shutdown. Not for all scheduled firings (but not yet fired) of jobs to occur.

Also, worker threads are only used for executing jobs. Jobs that are waiting for their trigger fire times to arrive are not using threads. When the job's execute method is complete, the thread returns to the pool, ready to execute the next job to have a fire time arrive.
 
 
Forum Index -> Quartz
Go to:   
Powered by JForum 2.1.7 © JForum Team