MCPcopy Create free account
hub / github.com/devfeel/dottask / RunOnce

Method RunOnce

crontask.go:106–109  ·  view source on GitHub ↗

RunOnce do task only once no match Express or Interval no recover panic support for #6 新增RunOnce方法建议

()

Source from the content-addressed store, hash-verified

104// no recover panic
105// support for #6 新增RunOnce方法建议
106func (task *CronTask) RunOnce() error {
107 err := task.handler(task.getTaskContext())
108 return err
109}
110
111// NewCronTask create new cron task
112func NewCronTask(taskID string, isRun bool, express string, handler TaskHandle, taskData interface{}) (Task, error) {

Callers

nothing calls this directly

Calls 1

getTaskContextMethod · 0.80

Tested by

no test coverage detected