|The Apache Software Foundation is proud to present...||Version: 2.1.12-dev|
|Orthogonal views: Content Pretty content Links|
This implementation of the Java interface
is based on the Quartz
job scheduling project and the
RunnableManager as a ThreadPool implementation for the Quartz Scheduler.
WARNING: Consider the
JobScheduler interface as beta in terms of defined functionality as it will be
extended with additional requirements in the near future (i.e. getJobList).
QuartzJobScheduler implementation is written as a standard
Avalon component. So, its definition you'll find in the
cocoon.xconf file of Cocoon if you've included the cron-block in your build (see
block.properties or local.block.properties file respectively).
The snippet below shows the configuration example of the component itself:
There is nothing special about it. As you could see from the snippet above, inside the job scheduler component definition there are two parts:
The ThreadPool definition look like this:
As mentioned in the beginning, more information about the thread pool details base on the
RunnableManager#createPool(...) method can be found there.
The trigger definition section consists of a single
<triggers> element with as much as
<trigger> elements inside it. A
<cron> element is simply the concatenation of the values of the elements
<year> delimeted with spaces. You can use either form but the
<cron> element will be preferred by the implementation if you use both forms
together in one
<trigger> element. A description of the
expressions used inside the
<trigger> elements is described in the
object doing your work can be defined in the
file as a regular Avalon components. The
role attribute given to this component is
refered to by the
target attribute in the
<trigger> element above.
Below is the sample for the
Now you should take a look at the samples to show you how the API of the
JobScheduler can be used.
Copyright © 1999-2010 The Apache Software Foundation. All rights reserved.