Represents a job scheduled by the TimerService. More...
#include <TimerService.h>
Public Attributes | |
TimeOfDay | startTime |
When the event should start. | |
DaysOfWeek | repeatDays |
Days the job runs (bitmask) | |
uint32_t | durationMs = 0 |
Optional run duration in ms. | |
Event | startEvent |
Event to post at start. | |
Event | stopEvent |
Optional stop event. | |
bool | recurring = true |
If true, job repeats. | |
scheduleAt
, scheduleDailyAt
, scheduleDuration
) dynamically allocate an Event
using new
and clean it up automatically after posting (inside the timer callback).Repeating timers (scheduleEvery
) also allocate an Event
, which is reused on each invocation. It is not deleted automatically and is assumed to remain valid for the lifetime of the timer.
It is now possible to cancel scheduled jobs using a job ID which will delete the timer and free the associated event.
Definition at line 56 of file TimerService.h.
uint32_t TimerJob::durationMs = 0 |
Definition at line 60 of file TimerService.h.
bool TimerJob::recurring = true |
Definition at line 63 of file TimerService.h.
DaysOfWeek TimerJob::repeatDays |
Definition at line 59 of file TimerService.h.
Event TimerJob::startEvent |
Definition at line 61 of file TimerService.h.
TimeOfDay TimerJob::startTime |
Definition at line 58 of file TimerService.h.
Event TimerJob::stopEvent |
Definition at line 62 of file TimerService.h.