We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When scheduling a job, I expected to get an entryID for this job, so I can remove this job later.
The text was updated successfully, but these errors were encountered:
you can use jobrunner.StatusPage() to extract entry id
jobrunner.StatusPage()
Sorry, something went wrong.
jobrunner.StatusPage() 没有办法灵活的停止某个任务,当创建了两个同样函数的任务时,并无法进行精确的定位我要删除哪一个, 既然MainCron.Schedule(sched, New(job))公开了entry id,那么应该也有相应的返回
You can use like that:
status := jobrunner.StatusJson() jobs := status["jobrunner"].([]jobrunner.StatusData) for _, job := range jobs { if job.JobRunner.Name == "YOUR_JOB_NAME" { id := job.Id jobrunner.Remove(id) // Remove YOUR_JOB_NAME by its ID err := jobrunner.Schedule(YOUR_JOB_NAME, SyncAllUsersJob{}) // Reschedule with new interval if err != nil { log.Println(err.Error()) } break } }
No branches or pull requests
When scheduling a job, I expected to get an entryID for this job, so I can remove this job later.
The text was updated successfully, but these errors were encountered: