michaelmarconi/oncue — pull request #21 by mfoo (2013-03-21 12:30:30+00:00)
Title: Quartz scheduler

This implements a Quartz based scheduler using the akka-camel and camel-quartz components. TimedJobs can be created and specified in your configuration file and can be given a set of parameters and a number of times to retry job creation if no worker can pick up the job. If no retry count is specified, the `TimedJob` will retry forever until its job has been accepted.

You can use any subclass of `AbstractWorker` for the worker type.

See example configuration below:

// Run jobs on a timetable
// See: http://camel.apache.org/quartz.html for URI format
timetable = [
{
type = TestWorker
name = "test-worker-1"
endpointUri = "quartz://test-worker-1?trigger.repeatInterval=1000&trigger.repeatCount=-1&fireNow=false"
},
{
type = TestWorker
name = "test-worker-2"
endpointUri = "quartz://test-worker-2?trigger.repeatInterval=1000&trigger.repeatCount=-1&fireNow=false"
parameters = {
user-defined-key-1 = "user defined value 1"
user-defined-key-2 = "user defined value 2"
}
failureRetryCount = 4
}
]