schedule

package
v0.28.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: CC0-1.0 Imports: 13 Imported by: 0

Documentation

Overview

Package schedule installs and removes the prosa-sync background job using the OS-native scheduler: launchd on macOS, systemd user timers on Linux. The package surface is intentionally small — Install, Uninstall, Status — so callers (prosa setup, prosa schedule install) stay agnostic to which OS they target.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnsupported = fmt.Errorf("scheduler not supported on this platform")

Functions

func Install

func Install(ctx context.Context, binaryPath string, interval time.Duration) error

Install installs or replaces the prosa-sync scheduled job for the current platform.

func Uninstall

func Uninstall(ctx context.Context) error

Uninstall removes the prosa-sync scheduled job. Missing jobs are treated as success.

Types

type State

type State struct {
	Installed bool
	Interval  time.Duration
	UnitPath  string // plist path on macOS; .timer path on Linux
}

State describes the current state of the prosa-sync scheduled job.

func Status

func Status(ctx context.Context) (State, error)

Status reports the prosa-sync scheduled job state for the current platform.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL