|
@@ -34,7 +34,7 @@ func (t *TaskSchedule) AddTask(msg []byte) error {
|
|
return nil
|
|
return nil
|
|
}
|
|
}
|
|
newJson := gjson.New(task.Actions)
|
|
newJson := gjson.New(task.Actions)
|
|
- server.Log.Debugf("add task: taskId:%s,corn:%s,actions:%s", task.TaskId, task.Cron, newJson.MustToJsonString())
|
|
|
|
|
|
+ server.Log.Debugf("add task: taskId:%s,corn:%s,times:%d,actions:%s", task.TaskId, task.Cron, task.Times, newJson.MustToJsonString())
|
|
// 创建任务
|
|
// 创建任务
|
|
entity, err := t.cron.AddTimes(context.Background(), task.Cron, task.Times, func(ctx context.Context) {
|
|
entity, err := t.cron.AddTimes(context.Background(), task.Cron, task.Times, func(ctx context.Context) {
|
|
if err = NewTaskExecutor(task.Actions).Do(); err != nil {
|
|
if err = NewTaskExecutor(task.Actions).Do(); err != nil {
|