cron

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: May 25, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	ID          string                 `json:"id"`
	Name        string                 `json:"name"`
	Description string                 `json:"description"`
	Schedule    string                 `json:"schedule"`
	Prompt      string                 `json:"prompt"`
	Skills      []string               `json:"skills,omitempty"`
	Platform    string                 `json:"platform,omitempty"`
	Enabled     bool                   `json:"enabled"`
	NoAgent     bool                   `json:"no_agent"` // Skip agent, run script directly
	Script      string                 `json:"script"`   // Script/command for no_agent mode
	NextRun     *time.Time             `json:"next_run,omitempty"`
	LastRun     *time.Time             `json:"last_run,omitempty"`
	Metadata    map[string]interface{} `json:"metadata,omitempty"`
}

type Manager

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

func NewManager

func NewManager() (*Manager, error)

func (*Manager) Add

func (m *Manager) Add(job *Job) error

func (*Manager) Get

func (m *Manager) Get(name string) *Job

func (*Manager) GetDueJobs

func (m *Manager) GetDueJobs() []*Job

func (*Manager) List

func (m *Manager) List() []*Job

func (*Manager) Remove

func (m *Manager) Remove(id string) error

func (*Manager) RunJob

func (m *Manager) RunJob(ctx context.Context, job *Job) error

func (*Manager) Update

func (m *Manager) Update(job *Job) error

Jump to

Keyboard shortcuts

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