## Name

Timer — generates message exchanges when a timer fires

## URI format

The URI format for a Timer endpoint is:

    timer:name[?options]

`name` is the name of the `Timer` object.

## Options

Table 48, “Timer options” lists the options for a Timer endpoint.

Table 48. Timer options

Name | Default | Description
--- | --- | ---
`time` |  | Specifies the date when the first event should be generated. If using the URI, the pattern expected is: `yyyy-MM-dd HH:mm:ss` or `yyyy-MM-dd'T'HH:mm:ss`.
`pattern` |  | Allows you to specify a custom date pattern to use for setting the time option using URI syntax.
`period` | `1000` | Specifies the period, in milliseconds, at which events are generated.
`delay` | `0` | Specifies the number of milliseconds to wait before the first event is generated. This option should not be used in conjunction with the `time` option.
`fixedRate` | `false` | Specifies if events take place at approximately regular intervals separated by the specified period.
`daemon` | `true` | Specifies whether or not the thread associated with the timer endpoint runs as a daemon.

## Exchange Properties

When the timer is fired, it adds the following information as properties to the `Exchange`:

Name | Type | Description
--- | --- | ---
`org.apache.camel.timer.name` | `String` | The value of the `name` option.
`org.apache.camel.timer.time` | `Date` | The value of the `time` option.
`org.apache.camel.timer.period` | `long` | The value of the `period` option.
`org.apache.camel.timer.firedTime` | `Date` | The time when the consumer fired.

## Message Headers

When the timer is fired, it adds the following information as headers to the IN message:

Name | Type | Description
--- | --- | ---
`firedTime` | `Date` | The time when the consumer fired.

## Related topics

Quartz