2
Scheduling logging and updates
Oliver Surke edited this page 2026-05-18 10:24:39 +02:00

Scheduling, logging, and updates

launchd schedule

ssr schedule on       # write & load ~/Library/LaunchAgents/<label>.plist
ssr schedule off     # unload & remove
ssr schedule status  # check state

Default label: de.surke.ssr.sync (SSR_LAUNCHD_LABEL). Hour/minute: SSR_SCHEDULE_HOUR, SSR_SCHEDULE_MINUTE.

Logs

Logs: $SSR_LOG_DIR/sync.out.log and sync.err.log.

tail -f ~/.local/state/ssr/logs/sync.err.log

launchd-level inspection:

launchctl list | grep ssr
log show --predicate 'process == "ssr"' --last 1h

Updating (three layers)

1. Tool code (this repository)

ssr update            # git pull --ff-only, then refresh side-effects
ssr update --dry-run  # show what would change
  • Refuses dirty working tree or detached HEAD.
  • Fast-forward only.
  • Re-renders and reloads launchd plist if launchd/ or bin/ssr* changed and schedule is on.
  • Prints new config keys when config/ssr.conf.example gains options.

2. Backup data (cloud)

Refreshed by scheduled ssr sync. Previous Brewfile kept as Brewfile.bak; deeper history = your cloud provider's versioning.

3. Homebrew / Mackup

ssr sync runs brew upgrade / brew cleanup when SSR_BREW_UPGRADE / SSR_BREW_CLEANUP are true (defaults). Set to false in ssr.conf to snapshot without auto-upgrading packages.