schedule

package
v0.0.0-...-9be93d0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Binding = "cicada.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, cache cache.Cache, 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

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

func NewCallbackEvent

func NewCallbackEvent(callback func()) *Event

func NewCommandEvent

func NewCommandEvent(command string) *Event

func (*Event) At

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

At Schedule the command at a given time.

func (*Event) Cron

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

Cron The Cron expression representing the event's frequency.

func (*Event) Daily

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

Daily Schedule the event to run daily.

func (*Event) DailyAt

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

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

DelayIfStillRunning Do not allow the event to overlap each other.

func (*Event) EveryFifteenMinutes

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

EveryFifteenMinutes Schedule the event to run every fifteen minutes.

func (*Event) EveryFiveMinutes

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

EveryFiveMinutes Schedule the event to run every five minutes.

func (*Event) EveryFourHours

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

EveryFourHours Schedule the event to run every four hours.

func (*Event) EveryFourMinutes

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

EveryFourMinutes Schedule the event to run every four minutes.

func (*Event) EveryMinute

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

EveryMinute Schedule the event to run every minute.

func (*Event) EverySixHours

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

EverySixHours Schedule the event to run every six hours.

func (*Event) EveryTenMinutes

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

EveryTenMinutes Schedule the event to run every ten minutes.

func (*Event) EveryThirtyMinutes

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

EveryThirtyMinutes Schedule the event to run every thirty minutes.

func (*Event) EveryThreeHours

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

EveryThreeHours Schedule the event to run every three hours.

func (*Event) EveryThreeMinutes

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

EveryThreeMinutes Schedule the event to run every three minutes.

func (*Event) EveryTwoHours

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

EveryTwoHours Schedule the event to run every two hours.

func (*Event) EveryTwoMinutes

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

EveryTwoMinutes Schedule the event to run every two minutes.

func (*Event) GetCallback

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

func (*Event) GetCommand

func (receiver *Event) GetCommand() string

func (*Event) GetCron

func (receiver *Event) GetCron() string

func (*Event) GetDelayIfStillRunning

func (receiver *Event) GetDelayIfStillRunning() bool

func (*Event) GetName

func (receiver *Event) GetName() string

func (*Event) GetSkipIfStillRunning

func (receiver *Event) GetSkipIfStillRunning() bool

func (*Event) Hourly

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

Hourly Schedule the event to run hourly.

func (*Event) HourlyAt

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

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

func (*Event) IsOnOneServer

func (receiver *Event) IsOnOneServer() bool

func (*Event) Name

func (receiver *Event) Name(name string) schedule.Event

func (*Event) OnOneServer

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

func (*Event) SkipIfStillRunning

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

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