Expand description
Task groups can be used whenever there is a sequence of tasks that need to be executed at regular intervals, and the sequence can change across different cycles.
As an example lets suppose we have a list of servers that we want to healthcheck at regular
intervals. First, we need to know the list of servers, and the list could change at any time,
and once we have the list we need to schedule the health check. Refer to task_group.rs
in
the example folder to see how such a check could be scheduled.
Traitsยง
- Task
Group - Defines a group of tasks. Task groups allow you to schedule the execution of different tasks
uniformly in a specific interval. The task discovery will be performed by
get_tasks
that will return a list of task ids. The returned task ids will be used by theexecute
function to run the specified task.get_tasks
will be executed one per interval, whileexecute
will be executed everyinterval
/ number of tasks. See also: example in the module documentation. - Task
Group Scheduler - Allows the execution of a
TaskGroup
.