Documentation
¶
Overview ¶
Package scheduling provides command scheduling capabilities
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ScheduleType ¶
type ScheduleType string
ScheduleType represents the type of schedule
const ( ScheduleOnce ScheduleType = "once" ScheduleInterval ScheduleType = "interval" ScheduleDaily ScheduleType = "daily" ScheduleWeekly ScheduleType = "weekly" ScheduleCron ScheduleType = "cron" )
type ScheduledCommand ¶
type ScheduledCommand struct {
ID string
Command string
Args []string
Schedule Schedule
Enabled bool
LastRun time.Time
NextRun time.Time
RunCount int
CreatedAt time.Time
}
ScheduledCommand represents a scheduled command
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler manages scheduled commands
func (*Scheduler) AddCommand ¶
func (s *Scheduler) AddCommand(cmd *ScheduledCommand) error
AddCommand adds a scheduled command
func (*Scheduler) ListCommands ¶
func (s *Scheduler) ListCommands() []*ScheduledCommand
ListCommands returns all scheduled commands
func (*Scheduler) RemoveCommand ¶
RemoveCommand removes a scheduled command
Click to show internal directories.
Click to hide internal directories.