schedule

package
v0.10.3 Latest Latest
Warning

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

Go to latest
Published: Feb 1, 2023 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ScheduleHandlers = map[string]process.Handler{
	"start": processScheduleStart,
	"stop":  processScheduleStop,
}

ScheduleHandlers chedule process handlers

View Source
var Schedules = map[string]*Schedule{}

Schedules the registered schedules

Functions

This section is empty.

Types

type Schedule

type Schedule struct {
	Name     string        `json:"name"`
	Process  string        `json:"process,omitempty"`
	Schedule string        `json:"schedule"`
	TaskName string        `json:"task,omitempty"`
	Args     []interface{} `json:"args,omitempty"`

	Enabled bool
	// contains filtered or unexported fields
}

Schedule the schedule struct

func Load

func Load(file string, name string) (*Schedule, error)

Load load schedule

func Select

func Select(name string) *Schedule

Select select schedule by name

func (*Schedule) Start

func (sch *Schedule) Start()

Start start the schedule

func (*Schedule) Stop

func (sch *Schedule) Stop()

Stop start the schedule

Jump to

Keyboard shortcuts

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