Source File
option.go
Belonging Package
github.com/robfig/cron/v3
package cronimport ()// Option represents a modification to the default behavior of a Cron.type Option func(*Cron)// WithLocation overrides the timezone of the cron instance.func ( *time.Location) Option {return func( *Cron) {.location =}}// WithSeconds overrides the parser used for interpreting job schedules to// include a seconds field as the first one.func () Option {return WithParser(NewParser(Second | Minute | Hour | Dom | Month | Dow | Descriptor,))}// WithParser overrides the parser used for interpreting job schedules.func ( ScheduleParser) Option {return func( *Cron) {.parser =}}// WithChain specifies Job wrappers to apply to all jobs added to this cron.// Refer to the Chain* functions in this package for provided wrappers.func ( ...JobWrapper) Option {return func( *Cron) {.chain = NewChain(...)}}// WithLogger uses the provided logger.func ( Logger) Option {return func( *Cron) {.logger =}}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |