Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidCronExpr = errors.New("invalid cron expression") ErrJobAlreadyExist = errors.New("job already exist") ErrJobNotFound = errors.New("job not found") ErrAlreadyStarted = errors.New("already started") ErrNotRunning = errors.New("not running") )
Errors.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler schedules jobs to run them at a given interval.
func (*Scheduler) Add ¶
Add adds a job in the scheduler. The job runs every interval duration when the scheduler is started or already running.
func (*Scheduler) AddCron ¶
AddCron adds the job in the scheduler. The job will be run depending on the cron expression when the scheduler is started or already running.
Click to show internal directories.
Click to hide internal directories.