schedule

package
v0.123.11 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2025 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLI

func CLI() *cobra.Command

CLI creates the schedule command

Types

type Daemon

type Daemon struct {
	// contains filtered or unexported fields
}

Daemon runs scheduled jobs

func NewDaemon

func NewDaemon() (*Daemon, error)

NewDaemon creates a new daemon

func (*Daemon) Start

func (d *Daemon) Start() error

Start starts the daemon to monitor and execute jobs

func (*Daemon) Stop

func (d *Daemon) Stop()

Stop stops the daemon

type Job

type Job struct {
	ID        string    `json:"id"`
	Name      string    `json:"name"`
	Schedule  string    `json:"schedule"` // Cron expression
	Namespace string    `json:"namespace"`
	Auto      bool      `json:"auto"` // Auto-discovery
	Upload    string    `json:"upload,omitempty"`
	Enabled   bool      `json:"enabled"`
	RunCount  int       `json:"runCount"`
	LastRun   time.Time `json:"lastRun,omitempty"`
	Created   time.Time `json:"created"`
}

Job represents a scheduled support bundle collection job

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles job operations

func NewManager

func NewManager() (*Manager, error)

NewManager creates a new job manager

func (*Manager) CreateJob

func (m *Manager) CreateJob(name, schedule, namespace string, auto bool, upload string) (*Job, error)

CreateJob creates a new scheduled job

func (*Manager) DeleteJob

func (m *Manager) DeleteJob(nameOrID string) error

DeleteJob removes a job

func (*Manager) GetJob

func (m *Manager) GetJob(nameOrID string) (*Job, error)

GetJob retrieves a job by name or ID

func (*Manager) ListJobs

func (m *Manager) ListJobs() ([]*Job, error)

ListJobs returns all saved jobs

Jump to

Keyboard shortcuts

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