#include <kanzi/scheduler/scheduler.hpp>
Public Member Functions | |
| bool | submitTask (const string &name, Task task) |
| Submits a task for one-shot execution. More... | |
| bool | insertRecurringTask (const string &name, Task task) |
| Submits a task for recurring execution. More... | |
| bool | removeTask (const string &name) |
| Immediately removes a task from the scheduler. More... | |
| bool | removeTaskAfterExecution (const string &name) |
| Removes a task from the scheduler after its execution (next or current) ends. More... | |
| void | executeTasks () |
| Executes all tasks in ascending alphabetical order and removes non-recurring tasks after their execution. More... | |
| void | debugPrintTasks () const |
| Prints the tasks to the log. More... | |
Scheduler class.
Represents an ordered set of tasks.
| bool kanzi::Scheduler::submitTask | ( | const string & | name, |
| Task | task | ||
| ) |
Submits a task for one-shot execution.
| name | The name of the task. Establishes the task execution order. |
| task | The task to submit. |
| bool kanzi::Scheduler::insertRecurringTask | ( | const string & | name, |
| Task | task | ||
| ) |
Submits a task for recurring execution.
| name | The name of the task. Establishes the task execution order. |
| task | The task to submit. |
| bool kanzi::Scheduler::removeTask | ( | const string & | name | ) |
Immediately removes a task from the scheduler.
A task may not remove itself.
| name | The name of the task to remove. |
| bool kanzi::Scheduler::removeTaskAfterExecution | ( | const string & | name | ) |
Removes a task from the scheduler after its execution (next or current) ends.
| name | The name of the task to remove. |
| void kanzi::Scheduler::executeTasks | ( | ) |
Executes all tasks in ascending alphabetical order and removes non-recurring tasks after their execution.
Removal of tasks may be interleaved with execution of other tasks.
| void kanzi::Scheduler::debugPrintTasks | ( | ) | const |
Prints the tasks to the log.