package
Version:
v1.0.4
Opens a new window with list of versions in this module.
Published: Jun 28, 2026
License: Apache-2.0
Opens a new window with license information.
Imports: 6
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
Job represents a registered task with its scheduling constraints.
type Scheduler struct {
}
Scheduler manages the execution of periodic background jobs.
New creates a new task scheduler.
Cron registers a task to run repeatedly according to a 5-field cron expression.
Every registers a task to run repeatedly at the given interval.
Run starts the scheduler in the background. It blocks until the context is canceled.
Typically, you call this in a goroutine: `go scheduler.Run(ctx)`
Stop sends the cancellation signal to all jobs and waits for them to finish.
Task represents a function that can be scheduled.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.