Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CronDataTaskJob ¶
type CronDataTaskJob struct { Time string TaskId string WorkFun func(s string, data interface{}) RunId int Data interface{} }
/define data job
func NewDataJob ¶
func NewDataJob(time string, workFun func(s string, data interface{}), data interface{}) *CronDataTaskJob
type CronTask ¶
type CronTask struct { CronInstance *cron.Cron WithSeconds bool // contains filtered or unexported fields }
/define the cron wrapper
func (*CronTask) AddTaskWithData ¶
func (cm *CronTask) AddTaskWithData(t *CronDataTaskJob) error
/add a task
type CronTaskJob ¶
/define the job
func NewJob ¶
func NewJob(time string, fun func(s string), data interface{}) *CronTaskJob
type CronTimeTaskJob ¶
type CronTimeTaskJob struct { CronDataTaskJob // contains filtered or unexported fields }
/define data job
func NewTimeJob ¶
func NewTimeJob(time time.Time, workFun func(s string, data interface{}), data interface{}) *CronTimeTaskJob
Click to show internal directories.
Click to hide internal directories.