schedule

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: May 29, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

package Schedule

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Schedule

type Schedule struct {
	ID     cron.EntryID
	Cron   string
	Task   func()
	Status string
}

Schedule

type ScheduleManage

type ScheduleManage struct {
	Cron      *cron.Cron
	Schedules map[cron.EntryID]*Schedule
}

ScheduleManage

func NewScheduleManage

func NewScheduleManage() *ScheduleManage

NewScheduleManage

@return *ScheduleManage

func (*ScheduleManage) Add

func (sm *ScheduleManage) Add(spec string, cmd func()) error

Add one manage

@receiver sm
@param spec
@param cmd
@return error

func (*ScheduleManage) GetAll

func (sm *ScheduleManage) GetAll() map[cron.EntryID]*Schedule

GetAll Manage

@receiver sm
@return map

func (*ScheduleManage) StartAll

func (sm *ScheduleManage) StartAll()

StartAll

@receiver sm

Jump to

Keyboard shortcuts

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