#include <icy/sched/trigger.h>Inherits:
Trigger
Trigger that fires repeatedly at a fixed time interval.
| Return | Name | Description |
|---|---|---|
Timespan | interval | This value represents the interval to wait before running the task. |
int | maxTimes | The maximum number of times the task will be run before it is destroyed. 0 for no effect. |
Timespan intervalThis value represents the interval to wait before running the task.
int maxTimesThe maximum number of times the task will be run before it is destroyed. 0 for no effect.
| Return | Name | Description |
|---|---|---|
IntervalTrigger | Constructs the trigger with type "IntervalTrigger" and maxTimes = 0 (unlimited). | |
void | update virtual | Advances scheduleAt by one interval period. |
bool | expired virtual | Returns true when maxTimes > 0 and timesRun >= maxTimes. |
void | serialize virtual | Serializes interval fields (days, hours, minutes, seconds) in addition to base fields. |
void | deserialize virtual | Deserializes interval fields from root. Throws if the resulting interval is zero. |
IntervalTrigger()Constructs the trigger with type "IntervalTrigger" and maxTimes = 0 (unlimited).
virtual
virtual void update()Advances scheduleAt by one interval period.
virtual
virtual bool expired()Returns true when maxTimes > 0 and timesRun >= maxTimes.
virtual
virtual void serialize(json::Value & root)Serializes interval fields (days, hours, minutes, seconds) in addition to base fields.
root JSON object to populate.virtual
virtual void deserialize(json::Value & root)Deserializes interval fields from root. Throws if the resulting interval is zero.
root JSON object previously produced by serialize().