scheduler

package
v0.89.2 Latest Latest
Warning

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

Go to latest
Published: May 30, 2026 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrScheduledJobNotFound  = errors.New("scheduled job not found")
	ErrScheduledJobDisabled  = errors.New("scheduled job is disabled")
	ErrScheduledJobAmbiguous = errors.New("multiple scheduled jobs matched, narrow your selection")
)

Functions

func Start

func Start(ctx context.Context, dockerCli command.Cli, log *slog.Logger, wg *sync.WaitGroup)

func TriggerNow added in v0.87.0

func TriggerNow(ctx context.Context, dockerCli command.Cli, log *slog.Logger, jobName, stackName string) (string, error)

TriggerNow executes one configured scheduled job immediately. Job selection matches by container/service name and optional stack name.

Types

type JobInfo added in v0.87.0

type JobInfo struct {
	Name           string                  `json:"name"`
	Enabled        bool                    `json:"enabled"`
	Stack          string                  `json:"stack,omitempty"`
	Mode           string                  `json:"mode"`
	Schedule       string                  `json:"schedule,omitempty"`
	ExecutionMode  docker.JobExecutionMode `json:"execution_mode,omitempty"`
	SkipRunning    bool                    `json:"skip_running"`
	NotifyOn       docker.JobNotifyOn      `json:"notify_on,omitempty"`
	Replicas       uint64                  `json:"replicas,omitempty"`
	LastRunAt      *time.Time              `json:"last_run_at,omitempty"`
	NextRunAt      *time.Time              `json:"next_run_at,omitempty"`
	LabelNextRunAt *time.Time              `json:"label_next_run_at,omitempty"`
	Repository     string                  `json:"repository,omitempty"`
	ScheduleError  string                  `json:"schedule_error,omitempty"`
	Valid          bool                    `json:"valid"`
}

JobInfo describes one scheduler-managed target and its runtime scheduling status.

func ListJobs added in v0.87.0

func ListJobs(ctx context.Context, dockerCli command.Cli, stackName string) ([]JobInfo, error)

ListJobs returns all discovered scheduler jobs, optionally filtered by stack name.

Jump to

Keyboard shortcuts

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