Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Tasks map[string]TaskConfig `toml:"tasks"`
Reminders map[string]ReminderConfig `toml:"reminders"`
}
Config represents the orbit configuration structure.
func LoadConfig ¶
LoadConfig loads and returns the configuration from the specified path.
type OnMissedPolicy ¶
type OnMissedPolicy string
OnMissedPolicy defines behavior when a scheduled run is missed.
const ( OnMissedRunOnce OnMissedPolicy = "run_once" OnMissedSkip OnMissedPolicy = "skip" )
type ReminderConfig ¶
type ReminderConfig struct {
Command string `toml:"command"` // optional
Schedule string `toml:"schedule"`
Message string `toml:"message"`
Snooze string `toml:"snooze"`
Check string `toml:"check"` // optional: only fire if this command exits 0
}
ReminderConfig represents a reminder configuration.
type RetryConfig ¶
RetryConfig represents retry settings for a task.
func (RetryConfig) GetAttempts ¶
func (r RetryConfig) GetAttempts() int
GetAttempts returns the number of retry attempts, defaulting to 0 if nil.
type TaskConfig ¶
type TaskConfig struct {
Command string `toml:"command"`
Schedule string `toml:"schedule"`
OnMissed OnMissedPolicy `toml:"on_missed"`
Retry RetryConfig `toml:"retry"`
}
TaskConfig represents a task configuration.
Click to show internal directories.
Click to hide internal directories.