RandomRecurrentTrigger
A daily trigger that triggers a random number of times within a defined period of time of the day.
The random value is between the minNumberOfTriggers and maxNumberOfTriggers numbers specified. The time period is defined by a startTime and an endTime.
- Inheritance
-
- Object
- Serializable
- TriggerConfiguration
- RandomRecurrentTrigger
- Implemented types
- Annotations
-
- @JsonSerializable(includeIfNull: false, explicitToJson: true)
Constructors
RandomRecurrentTrigger.fromJson
RandomRecurrentTrigger
Creates a RandomRecurrentTrigger.
minNumberOfTriggers and maxNumberOfTriggers specify the range of the random number of triggers (e.g., between 3 and 8 times per day). startTime and endTime specify the period within a day the triggers take place (default is between 08:00 and 20:00). startTime must be before endTime.
Properties
endTime
End time of the day where the trigger can happen.
fromJsonFunction
The function which can convert a JSON string to an object of this type.
lastTriggerTimestamp
When this trigger last triggered, or null if never.
maxNumberOfTriggers
Maximum number of triggers per day. Default is 1.
minNumberOfTriggers
Minimum number of triggers per day. Default is 0.
startTime
Start time of the day where the trigger can happen.
Methods
toJson
Return a JSON encoding of this object.