schedule

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const Binding = "goravel.schedule"

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

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

func NewApplication

func NewApplication(artisan console.Artisan, log log.Log) *Application

func (*Application) Call

func (app *Application) Call(callback func()) schedule.Event

func (*Application) Command

func (app *Application) Command(command string) schedule.Event

func (*Application) Register

func (app *Application) Register(events []schedule.Event)

func (*Application) Run

func (app *Application) Run()

type Event added in v1.10.2

type Event struct {
	Command  string
	Callback func()
	// contains filtered or unexported fields
}

func (*Event) At added in v1.10.2

func (receiver *Event) At(time string) schedule.Event

At Schedule the command at a given time.

func (*Event) Cron added in v1.10.2

func (receiver *Event) Cron(expression string) schedule.Event

Cron The Cron expression representing the event's frequency.

func (*Event) Daily added in v1.10.2

func (receiver *Event) Daily() schedule.Event

Daily Schedule the event to run daily.

func (*Event) DailyAt added in v1.10.2

func (receiver *Event) DailyAt(time string) schedule.Event

DailyAt Schedule the event to run daily at a given time (10:00, 19:30, etc).

func (*Event) DelayIfStillRunning added in v1.10.2

func (receiver *Event) DelayIfStillRunning() schedule.Event

DelayIfStillRunning Do not allow the event to overlap each other.

func (*Event) EveryFifteenMinutes added in v1.10.2

func (receiver *Event) EveryFifteenMinutes() schedule.Event

EveryFifteenMinutes Schedule the event to run every fifteen minutes.

func (*Event) EveryFiveMinutes added in v1.10.2

func (receiver *Event) EveryFiveMinutes() schedule.Event

EveryFiveMinutes Schedule the event to run every five minutes.

func (*Event) EveryFourHours added in v1.10.2

func (receiver *Event) EveryFourHours() schedule.Event

EveryFourHours Schedule the event to run every four hours.

func (*Event) EveryFourMinutes added in v1.10.2

func (receiver *Event) EveryFourMinutes() schedule.Event

EveryFourMinutes Schedule the event to run every four minutes.

func (*Event) EveryMinute added in v1.10.2

func (receiver *Event) EveryMinute() schedule.Event

EveryMinute Schedule the event to run every minute.

func (*Event) EverySixHours added in v1.10.2

func (receiver *Event) EverySixHours() schedule.Event

EverySixHours Schedule the event to run every six hours.

func (*Event) EveryTenMinutes added in v1.10.2

func (receiver *Event) EveryTenMinutes() schedule.Event

EveryTenMinutes Schedule the event to run every ten minutes.

func (*Event) EveryThirtyMinutes added in v1.10.2

func (receiver *Event) EveryThirtyMinutes() schedule.Event

EveryThirtyMinutes Schedule the event to run every thirty minutes.

func (*Event) EveryThreeHours added in v1.10.2

func (receiver *Event) EveryThreeHours() schedule.Event

EveryThreeHours Schedule the event to run every three hours.

func (*Event) EveryThreeMinutes added in v1.10.2

func (receiver *Event) EveryThreeMinutes() schedule.Event

EveryThreeMinutes Schedule the event to run every three minutes.

func (*Event) EveryTwoHours added in v1.10.2

func (receiver *Event) EveryTwoHours() schedule.Event

EveryTwoHours Schedule the event to run every two hours.

func (*Event) EveryTwoMinutes added in v1.10.2

func (receiver *Event) EveryTwoMinutes() schedule.Event

EveryTwoMinutes Schedule the event to run every two minutes.

func (*Event) GetCallback added in v1.10.2

func (receiver *Event) GetCallback() func()

func (*Event) GetCommand added in v1.10.2

func (receiver *Event) GetCommand() string

func (*Event) GetCron added in v1.10.2

func (receiver *Event) GetCron() string

func (*Event) GetDelayIfStillRunning added in v1.10.2

func (receiver *Event) GetDelayIfStillRunning() bool

func (*Event) GetSkipIfStillRunning added in v1.10.2

func (receiver *Event) GetSkipIfStillRunning() bool

func (*Event) Hourly added in v1.10.2

func (receiver *Event) Hourly() schedule.Event

Hourly Schedule the event to run hourly.

func (*Event) HourlyAt added in v1.10.2

func (receiver *Event) HourlyAt(offset []string) schedule.Event

HourlyAt Schedule the event to run hourly at a given offset in the hour.

func (*Event) SkipIfStillRunning added in v1.10.2

func (receiver *Event) SkipIfStillRunning() schedule.Event

SkipIfStillRunning Do not allow the event to overlap each other.

type Logger

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

func NewLogger added in v1.10.2

func NewLogger(log log.Log) *Logger

func (*Logger) Error

func (log *Logger) Error(err error, msg string, keysAndValues ...any)

func (*Logger) Info

func (log *Logger) Info(msg string, keysAndValues ...any)

type ServiceProvider

type ServiceProvider struct {
}

func (*ServiceProvider) Boot

func (receiver *ServiceProvider) Boot(app foundation.Application)

func (*ServiceProvider) Register

func (receiver *ServiceProvider) Register(app foundation.Application)

Jump to

Keyboard shortcuts

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