Documentation
¶
Index ¶
- func AddSimpleJob(spec string, cmd func()) (cron.EntryID, error)
- func AddSimpleSingletonJob(spec string, cmd func()) (cron.EntryID, error)
- func NewJob(jobName string, spec *string, autoReloadSpec bool, cmd func(), ...) *jobFunc
- func NewJobAndRegister(jobName string, spec *string, autoReloadSpec bool, cmd func(), ...) error
- func RawInstance() *cron.Cron
- func Start()
- type CronModule
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddSimpleJob ¶ added in v0.0.2
AddSimpleJob 添加简单任务
func AddSimpleSingletonJob ¶ added in v0.0.2
AddSimpleSingletonJob 添加简单单例任务 该任务将忽略正在运行的任务的调度
func NewJob ¶ added in v0.0.2
func NewJob(jobName string, spec *string, autoReloadSpec bool, cmd func(), multiRun ...bool) *jobFunc
NewJob 初始化一个Job配置
func NewJobAndRegister ¶ added in v0.0.4
func NewJobAndRegister(jobName string, spec *string, autoReloadSpec bool, cmd func(), multiRun ...bool) error
NewJobAndRegister 初始化一个Job配置 并注册
func RawInstance ¶
func RawInstance() *cron.Cron
Types ¶
type CronModule ¶
func (*CronModule) ModuleConfig ¶
func (c *CronModule) ModuleConfig() *declaration.ModuleConfig
func (*CronModule) Register ¶
func (c *CronModule) Register() (interface{}, error)
func (*CronModule) Unregister ¶
func (c *CronModule) Unregister(maxWaitSeconds uint) (bool, error)
Click to show internal directories.
Click to hide internal directories.