cmdCron

package module
v0.0.0-...-1b15b8d Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2022 License: GPL-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

View Source
const Group = "Cron"

Variables

This section is empty.

Functions

This section is empty.

Types

type Cron

type Cron struct {
	Scheduler *gocron.Scheduler
	Job       *gocron.Job
	Error     error

	SelfCmd *cobra.Command
	// contains filtered or unexported fields
}

func New

func New() *Cron

func (*Cron) AddJob

func (c *Cron) AddJob(cron string, tag string, jobFunc interface{}, args ...interface{}) (*gocron.Job, error)

func (*Cron) AttachCommands

func (c *Cron) AttachCommands(cmd *cobra.Command) *cobra.Command

func (*Cron) CmdCron

func (c *Cron) CmdCron(cmd *cobra.Command, args []string) error

func (*Cron) CmdCronAdd

func (c *Cron) CmdCronAdd(_ *cobra.Command, _ []string) error

func (*Cron) CmdCronList

func (c *Cron) CmdCronList(_ *cobra.Command, _ []string) error

func (*Cron) CmdCronRemove

func (c *Cron) CmdCronRemove(_ *cobra.Command, _ []string) error

func (*Cron) CmdCronRun

func (c *Cron) CmdCronRun(_ *cobra.Command, args []string) error

func (*Cron) GetCmd

func (c *Cron) GetCmd() *cobra.Command

func (*Cron) InitArgs

func (c *Cron) InitArgs(_ *cobra.Command, _ []string) error

func (*Cron) Jobs

func (c *Cron) Jobs() []*gocron.Job

func (*Cron) PrintJobs

func (c *Cron) PrintJobs()

func (*Cron) ReExecute

func (c *Cron) ReExecute() error

func (*Cron) StartBlocking

func (c *Cron) StartBlocking() error

Jump to

Keyboard shortcuts

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