pub fn new_simple_service_task(
name: &str,
interval: Duration,
tasks: Vec<(String, SimpleServiceTaskFuture)>,
) -> SimpleServiceTaskExpand description
Creates a new SimpleServiceTask with the specified name, interval, and collection of tasks. This service manages multiple background tasks that run concurrently at fixed intervals.
ยงArguments
name- Identifier for this service instance, used in logginginterval- Duration between task executions (e.g., Duration::from_secs(60) for minute intervals)tasks- Vector of named tasks to execute periodically, where each task is a tuple of (name, task_function)