|
ORE Studio 0.0.4
|
In-process scheduler loop that fires jobs based on cron expressions. More...
#include <scheduler_loop.hpp>

Public Member Functions | |
| scheduler_loop (database::context system_ctx, std::vector< std::unique_ptr< action_handler > > handlers) | |
| boost::asio::awaitable< void > | run (boost::asio::io_context &ioc) |
| Run the scheduler loop. | |
| void | reload () |
| Signal the loop to reload job definitions on the next tick. | |
In-process scheduler loop that fires jobs based on cron expressions.
Loads all active job definitions at startup, then wakes at each minute boundary to evaluate which jobs are due. Each firing creates a job_instance record and delegates execution to the appropriate action_handler.
Call reload() to signal the loop that the job table has changed; it will reload definitions on the next tick.
| boost::asio::awaitable< void > run | ( | boost::asio::io_context & | ioc | ) |
Run the scheduler loop.
This coroutine runs indefinitely, waking at each minute boundary and firing any due jobs. Returns only when the io_context is stopped.