cronext

package module
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2022 License: MIT Imports: 5 Imported by: 1

README

CronExt

cron extend

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Job       string
	Scheduler string
	Logger    *zap.Logger
	Hs        JobHistoryService
	// contains filtered or unexported fields
}

func (*Job) PrintNextRuntime

func (jb *Job) PrintNextRuntime()

func (*Job) Schedule

func (jb *Job) Schedule(cmd func()) error

func (*Job) WithHistory

func (jb *Job) WithHistory() cron.JobWrapper

type JobHistory

type JobHistory struct {
	Job      string
	Start    time.Time
	Finished time.Time
	Duration time.Duration
}

type JobHistoryService

type JobHistoryService interface {
	ToHistory(job JobHistory) error
	GetLastRuntime(job string) (time.Time, error)
}

type RamHistoryService

type RamHistoryService struct {
	Logger *zap.Logger
	// contains filtered or unexported fields
}

func (*RamHistoryService) GetLastRuntime

func (a *RamHistoryService) GetLastRuntime(job string) (time.Time, error)

func (*RamHistoryService) ToHistory

func (a *RamHistoryService) ToHistory(job JobHistory) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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