Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,8 @@ pub struct CronJobConfig {
/// Whether this cronjob is active (default: true)
#[serde(default = "default_true")]
pub enabled: bool,
/// Stable unique identifier (required when disable_on_success is set)
pub id: Option<String>,
/// Cron expression (5-field POSIX format)
pub schedule: String,
/// Target channel ID
Expand All @@ -356,6 +358,14 @@ pub struct CronJobConfig {
/// Timezone (default: "UTC")
#[serde(default = "default_cron_timezone")]
pub timezone: String,
/// Shell command to evaluate goal; exit 0 (+ optional match) = goal achieved, auto-disable job.
pub disable_on_success: Option<String>,
/// If set, stdout of disable_on_success must contain this string (in addition to exit 0).
pub disable_on_success_match: Option<String>,
/// Timeout in seconds for disable_on_success command (default: 60).
pub disable_on_success_timeout_secs: Option<u64>,
/// Working directory for disable_on_success command.
pub disable_on_success_working_dir: Option<String>,
}

fn default_cron_platform() -> String {
Expand Down
Loading
Loading