Timer#
The Timer task enables the possibility to have in a workflow different types of timers (sleep, timeout, repeated timer, cron job).
Warning
This task is currently deprecated and will be removed in future versions.
Inputs#
| Name | Data Type | IsTrigger | Description |
|---|---|---|---|
| Interval | Integer | No | Interval input for all timer types except for cronJob |
| Activate | Boolean | Yes | Activate/Deactivate the timer configured in the Task |
Note
Although the drawn Task box indicates the Activate input is of type any it will act based on the converted value to Boolean. The visual information will be fixed in a future version.
Outputs#
| Name | Data Type | Description |
|---|---|---|
| timestamp | DateTime | Timestamp of the timer occurrence in UTC. Emitted on every timer occurrence |
| Success | Boolean | true value emitted when the internal timer is triggered on mode Timer, Sleep or CronJob |
| Error | Error | Error that occurred during the processing of this task or when the timeout occurs |
Settings#
| Name | Data Type | Values | Default | Description |
|---|---|---|---|---|
| Auto Activate | Boolean | true | It is the timer of the Task to be active and start counting immediately when the workflow is activated (when the controller starts/restarts) | |
| Timer Type | enum | TimerSleepTimeoutCronJob | Timer | Type of timer to use by the Task. Each type has its own set of configurations |
Timer type Timer#
| Name | Data Type | Values | Default | Description |
|---|---|---|---|---|
| Interval | Integer | 10000 | Number of milliseconds to wait until the next activation of the timer | |
| Working Mode | UntilDeactivationNumberOfOccurrences | UntilDeactivation | How many times the timer will trigger while it is active | |
| Number of Occurrences | Integer | 30 | Number of triggers that will occur if WorkingMode is set to NumberOfOccurrences |
Timer type Sleep#
| Name | Data Type | Default | Description | |
|---|---|---|---|---|
| Interval | Integer | 10000 | Number of milliseconds to wait until the Task is activated. It will be automatically deactivated after this time |
Timer type Timeout#
| Name | Data Type | Default | Description |
|---|---|---|---|
| Interval | Integer | 10000 | Number of milliseconds to wait until a timeout is achieved. It will be automatically deactivated after this time |
Timer type CronJob#
| Name | Data Type | Values | Default | Description |
|---|---|---|---|---|
| Cron Expression | String | "* * * * * *" | Expression that defines a specific date and time when the job will be triggered | |
| Time Zone | enum | <timezones> | UTC | Time zone that is used for the job scheduling |
Behavior#
This task has four different modes of operation, however they will only trigger on one of the following conditions:
-
Auto Activatesetting is set totrue -
Activateinput is fed with atrueBoolean value (or compatible, like1,true,t,yes,y)
Timer#
Every interval milliseconds, both timestamp and Success outputs emit their respective values.
If the Task setting Working Mode is configured to UntilDeactivation it will never stop unless the Activate input is fed with a false Boolean value.
If the Task setting Working Mode is configured to NumberOfOccurrences, it will automatically stop after Number of Occurrences times.
Note
The first time the timer is triggered is after interval milliseconds.
Sleep#
Upon activation after interval milliseconds, both timestamp and Success outputs emit their respective values.
Timeout#
Upon activation after interval milliseconds and if it is not deactivated, both timestamp and Error outputs emit their respective values.
CronJob#
Upon activation when the date and time, specified by the cron expression, is reached, both timestamp and Success outputs emit their respective values.
Remarks#
if Activate input receives a false Boolean value, any active timer will be immediately deactivated.
When configured in mode Timeout, the Success output will never send any value.
If the task is reactivated, all internal definitions will be reset (especially CurrentNumberOfOccurrences).
This task uses a specific structure of context-based data called zone. More information on this topic can be read in the Zones page.




