Timer
Emits the last value received on input port according to a cron schedule.
In-ports
input <any>
— input value to emit on schedule.
config JSON
(dynamic) — accepts a JSON object with configuration properties that can be set at runtime.
Out-ports
output <any>
— emits the last received input value according to the schedule.
Overview
The Timer component emits the last value received on the input port according to a cron schedule. When a new value arrives on the input port, it replaces the previous value and will be emitted on the next scheduled execution.
Use cron expressions to define precise timing patterns, from simple intervals to complex schedules. The component supports timezone configuration for accurate scheduling across different time zones.
To stop the timer, send a RESET signal to the input port.
Settings
Enable realtime config port (useConfigPort
)
When enabled, this setting allows the component to be configured via the config port. The port accepts a configuration object as input, enabling dynamic property updates during runtime. While using this port won't trigger component reinitialization, it may result in the loss of some previous component state.
Schedule (schedule
)
Cron expression defining when to emit values. Uses syntax with 6 fields (seconds optional):
Pattern Format:
* * * * * *
│ │ │ │ │ │
│ │ │ │ │ └─ Day of Week (0-6, SUN-SAT, 7 — SUN)
│ │ │ │ └─── Month (1-12 or JAN-DEC)
│ │ │ └───── Day of Month (1-31)
│ │ └─────── Hour (0-23)
│ └───────── Minute (0-59)
└─────────── Second (0-59, optional)
Special Characters:
*
- All values,
- List separator (e.g.,1,3,5
)-
- Range (e.g.,1-5
)/
- Step values (e.g.,*/15
for every 15)L
- Last day of month/week#
- Nth occurrence (e.g.,5#2
for second Friday)
Common Patterns:
It is also possible to use the following "nicknames" as pattern.
@yearly
- Once a year (0 0 1 1 *
)@monthly
- Once a month (0 0 1 * *
)@weekly
- Once a week (0 0 * * 0
)@daily
- Once a day (0 0 * * *
)@hourly
- Once an hour (0 * * * *
)
- Required: Yes
- Type:
String
Timezone (timezone
)
Timezone for schedule execution using TZ database identifiers (e.g., America/New_York
, Europe/London
). When not provided, uses system timezone.
- Required: No
- Type:
String
Examples
Configuration Object
Here is an example configuration object for dynamic configuration:
{
"schedule": "0 */5 * * * *",
"timezone": "America/New_York"
}
This configuration emits values every 5 minutes in the New York timezone.
Related
See also
- Croner Pattern Documentation — Complete reference for cron expression syntax
- List of TZ Database Time Zones — Complete list of timezone identifiers