schedule

package
v1.0.68 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event interface {
	GetCron() string
	GetTitle() string
	GetCommand() string
	GetCallback() func()
	GetSkipIfStillRunning() bool
	GetDelayIfStillRunning() bool
	Cron(expression string) Event
	EveryMinute() Event
	EveryTwoMinutes() Event
	EveryThreeMinutes() Event
	EveryFourMinutes() Event
	EveryFiveMinutes() Event
	EveryTenMinutes() Event
	EveryFifteenMinutes() Event
	EveryThirtyMinutes() Event
	Hourly() Event
	HourlyAt(offset []string) Event
	EveryTwoHours() Event
	EveryThreeHours() Event
	EveryFourHours() Event
	EverySixHours() Event
	Daily() Event
	At(time string) Event
	DailyAt(time string) Event
	SkipIfStillRunning() Event
	DelayIfStillRunning() Event
}

type Schedule

type Schedule interface {
	//Call Add a new callback event to the schedule.
	Call(callback func()) Event

	//Command Add a new Artisan command event to the schedule.
	Command(command string) Event

	//Register schedules.
	Register(events []Event)

	//RegisterOne schedules.
	RegisterOne(event Event) (cron.EntryID, error)

	//Unregister schedules.
	Unregister(id int)

	//PauseEntry schedules.
	PauseEntry(id int)

	//StartEntry schedules.
	StartEntry(id int)

	Logs(id int) []string

	//Run schedules.
	Run()
}

Jump to

Keyboard shortcuts

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