scheduler

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package scheduler helps to schedule the task

Package scheduler helps to schedule the task

Package scheduler helps to schedule the task

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GoCron

type GoCron struct {
	// contains filtered or unexported fields
}

GoCron is a wrapper of gocron

func NewGoCron

func NewGoCron() *GoCron

NewGoCron create new instance of GoCron

func (*GoCron) AddFunc

func (gc *GoCron) AddFunc(spec string, cmd func()) error

AddFunc add new function to scheduler

func (*GoCron) Start

func (gc *GoCron) Start() error

Start the scheduler

type Scheduler

type Scheduler interface {
	AddFunc(spec string, cmd func()) error
	Start() error
}

Scheduler interface

type StaticScheduler

type StaticScheduler struct {
	// contains filtered or unexported fields
}

StaticScheduler definition

func NewStaticScheduler

func NewStaticScheduler() *StaticScheduler

NewStaticScheduler to create new static scheduler

func (*StaticScheduler) AddFunc

func (ss *StaticScheduler) AddFunc(spec string, cmd func()) error

AddFunc to add new function to cron scheduler

func (*StaticScheduler) Start

func (ss *StaticScheduler) Start() error

Start to start the cron scheduler

Jump to

Keyboard shortcuts

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