cron

package
v4.19.3 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	POS_SECOND = iota
	POS_MINUTE
	POS_HOUR
	POS_DAY_OF_MONTH
	POS_MONTH
	POS_DAY_OF_WEEK
)
View Source
const (
	SUNDAY = iota
	MONDAY
	TUESDAY
	WEDNESDAY
	THURSDAY
	FRIDAY
	SATURDAY
)

Variables

This section is empty.

Functions

func Register

func Register(cb callback)

func RegisteredCronJobs

func RegisteredCronJobs() []callback

func Wrap

func Wrap(name string, fn func() error, lockerFn func() contracts.Locker) func()

Types

type Command

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

func (*Command) At

func (c *Command) At(time string) contracts.Command

func (*Command) Cron

func (c *Command) Cron(expression string) contracts.Command

func (*Command) Daily

func (c *Command) Daily() contracts.Command

func (*Command) DailyAt

func (c *Command) DailyAt(time string) contracts.Command

func (*Command) Days

func (c *Command) Days(days []int) contracts.Command

func (*Command) EveryFifteenMinutes

func (c *Command) EveryFifteenMinutes() contracts.Command

func (*Command) EveryFifteenSeconds

func (c *Command) EveryFifteenSeconds() contracts.Command

func (*Command) EveryFiveMinutes

func (c *Command) EveryFiveMinutes() contracts.Command

func (*Command) EveryFiveSeconds

func (c *Command) EveryFiveSeconds() contracts.Command

func (*Command) EveryFourHours

func (c *Command) EveryFourHours() contracts.Command

func (*Command) EveryFourMinutes

func (c *Command) EveryFourMinutes() contracts.Command

func (*Command) EveryFourSeconds

func (c *Command) EveryFourSeconds() contracts.Command

func (*Command) EveryMinute

func (c *Command) EveryMinute() contracts.Command

func (*Command) EverySecond

func (c *Command) EverySecond() contracts.Command

func (*Command) EverySixHours

func (c *Command) EverySixHours() contracts.Command

func (*Command) EveryTenMinutes

func (c *Command) EveryTenMinutes() contracts.Command

func (*Command) EveryTenSeconds

func (c *Command) EveryTenSeconds() contracts.Command

func (*Command) EveryThirtyMinutes

func (c *Command) EveryThirtyMinutes() contracts.Command

func (*Command) EveryThirtySeconds

func (c *Command) EveryThirtySeconds() contracts.Command

func (*Command) EveryThreeHours

func (c *Command) EveryThreeHours() contracts.Command

func (*Command) EveryThreeMinutes

func (c *Command) EveryThreeMinutes() contracts.Command

func (*Command) EveryThreeSeconds

func (c *Command) EveryThreeSeconds() contracts.Command

func (*Command) EveryTwoHours

func (c *Command) EveryTwoHours() contracts.Command

func (*Command) EveryTwoMinutes

func (c *Command) EveryTwoMinutes() contracts.Command

func (*Command) EveryTwoSeconds

func (c *Command) EveryTwoSeconds() contracts.Command

func (*Command) Expression

func (c *Command) Expression() string

func (*Command) Fridays

func (c *Command) Fridays() contracts.Command

func (*Command) Func

func (c *Command) Func() func()

func (*Command) Hourly

func (c *Command) Hourly() contracts.Command

func (*Command) HourlyAt

func (c *Command) HourlyAt(minutes []int) contracts.Command

func (*Command) LastDayOfMonth

func (c *Command) LastDayOfMonth(time string) contracts.Command

func (*Command) Mondays

func (c *Command) Mondays() contracts.Command

func (*Command) Monthly

func (c *Command) Monthly() contracts.Command

func (*Command) MonthlyOn

func (c *Command) MonthlyOn(dayOfMonth string, time string) contracts.Command

func (*Command) Name

func (c *Command) Name() string

func (*Command) Quarterly

func (c *Command) Quarterly() contracts.Command

func (*Command) QuarterlyOn

func (c *Command) QuarterlyOn(dayOfQuarter string, time string) contracts.Command

func (*Command) Saturdays

func (c *Command) Saturdays() contracts.Command

func (*Command) Sundays

func (c *Command) Sundays() contracts.Command

func (*Command) Thursdays

func (c *Command) Thursdays() contracts.Command

func (*Command) Tuesdays

func (c *Command) Tuesdays() contracts.Command

func (*Command) Wednesdays

func (c *Command) Wednesdays() contracts.Command

func (*Command) Weekdays

func (c *Command) Weekdays() contracts.Command

func (*Command) Weekends

func (c *Command) Weekends() contracts.Command

func (*Command) Weekly

func (c *Command) Weekly() contracts.Command

func (*Command) WeeklyOn

func (c *Command) WeeklyOn(day int, time string) contracts.Command

func (*Command) Yearly

func (c *Command) Yearly() contracts.Command

func (*Command) YearlyOn

func (c *Command) YearlyOn(month string, dayOfMonth string, time string) contracts.Command

type Manager

type Manager struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func (*Manager) List

func (m *Manager) List() []contracts.Command

func (*Manager) NewCommand

func (m *Manager) NewCommand(name string, fn func() error) contracts.Command

func (*Manager) Run

func (m *Manager) Run(ctx context.Context) error

func (*Manager) Shutdown

func (m *Manager) Shutdown(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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