internal

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CronAdapter

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

CronAdapter isolates the robfig/cron/v3 dependency.

func NewCronAdapter

func NewCronAdapter() *CronAdapter

NewCronAdapter creates a new CronAdapter backed by robfig/cron v3.

func (*CronAdapter) OnStart

func (a *CronAdapter) OnStart() error

OnStart implements core.Lifecycle — starts the scheduler on application start.

func (*CronAdapter) OnStop

func (a *CronAdapter) OnStop() error

OnStop implements core.Lifecycle — stops the scheduler on application shutdown. Returns an error if jobs do not complete within 30 seconds.

func (*CronAdapter) RegisterRaw

func (a *CronAdapter) RegisterRaw(name, expr string, fn func()) error

RegisterRaw registers a cron function directly.

func (*CronAdapter) Start

func (a *CronAdapter) Start()

Start begins the background cron runner (non-blocking).

func (*CronAdapter) Stop

func (a *CronAdapter) Stop(ctx context.Context)

Stop halts the scheduler, waiting for all running jobs to complete.

Jump to

Keyboard shortcuts

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