Documentation
¶
Index ¶
- Constants
- func AddDurationFunc(cmd func(), duration time.Duration) (cron.EntryID, error)
- func AddEveryDayFunc(cmd func(), hour, minutes, seconds int) (cron.EntryID, error)
- func AddEveryHourFunc(cmd func(), minute, second int) (cron.EntryID, error)
- func AddFunc(spec string, cmd func()) (cron.EntryID, error)
- func AddJob(spec string, cmd cron.Job) (cron.EntryID, error)
- func Entries() []cron.Entry
- func Entry(id cron.EntryID) cron.Entry
- func Init(opts ...cron.Option)
- func Location() *time.Location
- func New(opts ...cron.Option) cfacade.IComponent
- func Remove(id cron.EntryID)
- func Run()
- func Schedule(schedule cron.Schedule, cmd cron.Job) cron.EntryID
- func Start()
- func Stop()
- type Component
- type CronLogger
Constants ¶
View Source
const (
Name = "cron_component"
)
Variables ¶
This section is empty.
Functions ¶
func AddDurationFunc ¶
AddDurationFunc 每间隔x秒执行一次
func AddEveryDayFunc ¶
AddEveryDayFunc 每天的x时x分x秒执行一次(每天1次)
func AddEveryHourFunc ¶
AddEveryHourFunc 每小时的x分x秒执行一次(每天24次)
func New ¶ added in v1.3.1
func New(opts ...cron.Option) cfacade.IComponent
Types ¶
type CronLogger ¶
type CronLogger struct { }
func (CronLogger) Error ¶
func (CronLogger) Error(err error, _ string, _ ...interface{})
func (CronLogger) Info ¶
func (CronLogger) Info(msg string, keysAndValues ...interface{})
Click to show internal directories.
Click to hide internal directories.