loopsmith_core/config/triggers.rs
1//! Section G — time and event triggers.
2
3use serde::{Deserialize, Serialize};
4
5#[derive(Debug, Clone, Serialize, Deserialize)]
6#[serde(tag = "type", rename_all = "snake_case")]
7pub enum Trigger {
8 /// Five-field cron expression.
9 Cron { expr: String },
10 /// Fire every N seconds. Timezone-independent, which makes it the right
11 /// choice for cadence that does not need to land at a wall-clock time.
12 Interval { seconds: u64 },
13 /// Fire when a path changes.
14 FileChange { path: String },
15 /// Fire when a named upstream goal becomes satisfied.
16 GoalSatisfied { goal: String },
17 /// Fire on demand only.
18 Manual,
19}