scheduler

Description

Run the scheduler. The scheduler will accept a schedule instruction and produce a runtime component to handle scheduling for that insstruction. The supported schedule instructions and their corresponding runtime handler are:
InstructionHandler
ojschedule _ojschedule
trigger _trigger
cron _cron
Schedules can be specified as part of the configuration for the Scheduler or they can be added to the scheduler later using schedule or from Oddjob Explorer.

This job uses quartz to provide the scheduling. Properties provided in the configuration are past through to quartz. For more information on these properties please see .

Schedules can be acessed by id using the path notation ${scheduler-id/schedule-id}. This is useful when a property, such as a schedule date, is required from the schedule.

An optional Perisister can be provided to persist schedules and schedule information.

Properties

NameDescriptionRequired
name A name, can be any text. No.
properties Properties which will be passed through to quartz. This is a map like property. No.
persister A component which is able to save and restore the schedules. No.
schedules The schedules this scheduler will run. No.
timeNow The time now. This is a convenience property to allow users to see the time on the server where the scheduler is being run. Read only.

Example

An alarm clock, showing also how to access the schedule time.

 <sequential name="An Alarm Clock">
   <scheduler id="scheduler" >
     <schedules >
       <ojschedule id="morning" job="${alarm}" >
         <schedule>
           <time on="07:00" />
         </schedule>
       <ojschedule
     </schedules>
   </scheduler>
   <folder>
     <echo id="alarm" text="Wake Up! - it's ${scheduler/morning.scheduleDate}" />
   </folder>
 </sequential>
 
Creating a schedule that persists schedule information.
 <scheduler name="Scheduler2" id="sched2" >
   <persister>
     <filePersister dir="${this.dir}/work/scheduler" >
   </persister>
 </scheduler>
 


(c) Rob Gordon 2005