|
PACS System 0.1.0
PACS DICOM system library
|
Cron-like schedule expression. More...
#include <task_scheduler_config.h>

Public Member Functions | |
| auto | to_string () const -> std::string |
| Convert to cron expression string. | |
| auto | is_valid () const noexcept -> bool |
| Check if the schedule is valid. | |
Static Public Member Functions | |
| static auto | every_minutes (int n) -> cron_schedule |
| Create a schedule that runs every N minutes. | |
| static auto | every_hours (int n) -> cron_schedule |
| Create a schedule that runs every N hours. | |
| static auto | daily_at (int hour, int minute=0) -> cron_schedule |
| Create a daily schedule at specific time. | |
| static auto | weekly_on (int day_of_week, int hour=0, int minute=0) -> cron_schedule |
| Create a weekly schedule. | |
| static auto | parse (const std::string &expr) -> cron_schedule |
| Parse a cron expression string. | |
Public Attributes | |
| std::string | minute {"*"} |
| Minute (0-59, or "*") | |
| std::string | hour {"*"} |
| Hour (0-23, or "*") | |
| std::string | day_of_month {"*"} |
| Day of month (1-31, or "*") | |
| std::string | month {"*"} |
| Month (1-12, or "*") | |
| std::string | day_of_week {"*"} |
| Day of week (0-6, Sunday=0, or "*") | |
Cron-like schedule expression.
Supports cron-style scheduling with minute, hour, day, month, weekday. Special values: * (any), ranges (1-5), lists (1,3,5), steps (*\/5)
Definition at line 54 of file task_scheduler_config.h.
|
inlinestaticnodiscard |
Create a daily schedule at specific time.
| hour | Hour of day (0-23) |
| minute | Minute of hour (0-59) |
Definition at line 96 of file task_scheduler_config.h.
|
inlinestaticnodiscard |
Create a schedule that runs every N hours.
| n | Hours between runs |
Definition at line 84 of file task_scheduler_config.h.
|
inlinestaticnodiscard |
Create a schedule that runs every N minutes.
| n | Minutes between runs |
Definition at line 74 of file task_scheduler_config.h.
References minute.
|
nodiscardnoexcept |
Check if the schedule is valid.
Definition at line 58 of file task_scheduler.cpp.
References day_of_month, day_of_week, hour, minute, and month.
|
staticnodiscard |
Parse a cron expression string.
| expr | Cron expression (e.g., "0 2 * * *" for daily at 2am) |
Definition at line 34 of file task_scheduler.cpp.
References day_of_month, day_of_week, hour, minute, and month.
|
nodiscard |
Convert to cron expression string.
Definition at line 53 of file task_scheduler.cpp.
References day_of_month, day_of_week, hour, minute, and month.
|
inlinestaticnodiscard |
Create a weekly schedule.
| day_of_week | Day of week (0=Sunday, 6=Saturday) |
| hour | Hour of day |
| minute | Minute of hour |
Definition at line 109 of file task_scheduler_config.h.
References day_of_week, hour, and minute.
| std::string kcenon::pacs::workflow::cron_schedule::day_of_month {"*"} |
Day of month (1-31, or "*")
Definition at line 62 of file task_scheduler_config.h.
Referenced by is_valid(), parse(), and to_string().
| std::string kcenon::pacs::workflow::cron_schedule::day_of_week {"*"} |
Day of week (0-6, Sunday=0, or "*")
Definition at line 68 of file task_scheduler_config.h.
Referenced by is_valid(), parse(), to_string(), and weekly_on().
| std::string kcenon::pacs::workflow::cron_schedule::hour {"*"} |
Hour (0-23, or "*")
Definition at line 59 of file task_scheduler_config.h.
Referenced by daily_at(), every_hours(), is_valid(), parse(), to_string(), and weekly_on().
| std::string kcenon::pacs::workflow::cron_schedule::minute {"*"} |
Minute (0-59, or "*")
Definition at line 56 of file task_scheduler_config.h.
Referenced by daily_at(), every_hours(), every_minutes(), is_valid(), parse(), to_string(), and weekly_on().
| std::string kcenon::pacs::workflow::cron_schedule::month {"*"} |
Month (1-12, or "*")
Definition at line 65 of file task_scheduler_config.h.
Referenced by is_valid(), parse(), and to_string().