QuartzPage edited by willem jiangCAMEL-2324Quartz ComponentThe quartz: component provides a scheduled delivery of messages using the Quartz scheduler.
URI formatquartz://timerName?options quartz://groupName/timerName?options quartz://groupName/timerName/cronExpression (@deprecated) quartz://groupName/timerName/?cron=_expression_ (Camel 2.0) quartz://timerName?cron=_expression_ (Camel 2.0)
For example, the following routing rule will fire two timer events to the mock:results endpoint: from("quartz://myGroup/myTimerName?trigger.repeatInterval=2&trigger.repeatCount=1").to("mock:result"); When using a StatefulJob, the JobDataMap is re-persisted after every execution of the job, thus preserving state for the next execution. Message HeadersCamel adds the getters from the Quartz Execution Context as header values. The following headers are added: The fireTime header contains the java.util.Date of when the exchange was fired. Using Cron TriggersAvaiable as of Camel 2.0 For example the following will fire a message at 12pm (noon) every day
from("quartz://myGroup/myTimerName?cron=0+0/5+12-18+?+*+MON-FRI").to("activemq:Totally.Rocks");
which is equivalent to using the cron _expression_ 0 0/5 12-18 ? * MON-FRI The following table shows the URI character encodings we use to preserve valid URI syntax:
Using Cron Triggers in Camel 1.x@deprecated For example, the following endpoint URI will fire a message at 12pm (noon) every day from("quartz://myGroup/myTimerName/0/0/12/*/*/$").to("activemq:Totally.Rocks"); which is equivalent to using the cron _expression_ 0 0 12 * * ? The following table shows the URI character encodings we use to preserve valid URI syntax:
See Also
Change Notification Preferences
View Online
|
View Change
|
Add Comment
|
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence
- [CONF] Apache Camel > Quartz confluence