Versions in this module Expand all Collapse all v1 v1.0.0 Dec 5, 2023 Changes in this version + const CANCELED + const DONE + const FAILED + const PENDING + const RECURRENT + const SIMPLE + func Define(jobName string, fn JobFunc) + func Every(schedule string) *recurrentScheduleDefinition + func In(d time.Duration) *simpleScheduleDefinition + func Init(c Config) (err error) + func On(t time.Time) *simpleScheduleDefinition + type Config struct + DB JobDatabase + DeleteOnCancel bool + DeleteOnDone bool + Location string + Logger Logger + MongoDB *MongoJobDBConfig + ProcessingRate time.Duration + type Finder struct + Data map[string]any + Name string + Status string + type Job struct + Data map[string]any + ID string + LastRunAt *time.Time + Name string + NextRunAt time.Time + ScheduleLimitDate *time.Time + ScheduleString string + Status ScheduleStatus + func List(f Finder) ([]*Job, error) + func (j *Job) Cancel() error + func (j *Job) Delete() error + func (j *Job) Done() error + func (j *Job) Fail() error + func (j *Job) HasFailed() bool + func (j *Job) IsCanceled() bool + func (j *Job) IsDone() bool + func (j *Job) IsPending() bool + func (j *Job) IsRecurrent() bool + func (j *Job) IsSimple() bool + type JobDatabase interface + DeleteJob func(j Job) error + InitJobDB func() error + List func(f Finder) ([]*Job, error) + ListExpiredSchedules func() ([]*Job, error) + SaveJob func(j Job) error + type JobFunc func(*Job) (err error) + type Logger interface + Error func(message string) + Errorf func(format string, a ...any) + type MongoJobDBConfig struct + CollName string + Conn *mongo.Client + DbName string + type ScheduleStatus string + func (t ScheduleStatus) String() string + type ScheduleType string + func (t ScheduleType) String() string