Expand description
Schedule claim/release — prevents double execution between CLI cron and Commander.
The executor field in Schedule tracks who is responsible for ticking.
PID file at ~/.mur/commander/commander.pid indicates Commander is alive.
Functions§
- auto_
detect_ executor - Determine the appropriate executor for a new schedule. If Commander is running, use Commander. Otherwise, use SystemCron.
- claim_
all_ for_ commander - Claim all schedules for Commander — sets executor to Commander. Returns the list of schedules that were claimed (had executor != Commander).
- commander_
pid_ path - Default Commander PID file path.
- is_
commander_ running - Check if Commander daemon is currently running.
- is_
commander_ running_ at - Check if Commander is running given a specific PID file path.
- load_
schedules - Load schedules from the default path.
- release_
all_ from_ commander - Release all schedules from Commander — sets executor back to SystemCron. Returns the list of schedules that were released.
- save_
schedules - Save schedules to the default path.
- schedules_
path - Default schedules.yaml path.