在使用hangfire中遇到了一个问题,使用
var jobId = BackgroundJob.Schedule(
() => Console.WriteLine("Delayed!"),
TimeSpan.FromDays(7));
现在得到这个jobId
后,想修改这个任务的延迟时间,该如何操作呢?
劳烦指教,不胜感激!
var jobId = BackgroundJob.Schedule(() => Console.WriteLine("Delayed!"),TimeSpan.FromDays(7));
BackgroundJob.Delete(jobId);
string rescheduleJobId = BackgroundJob.Schedule(() => Console.WriteLine("Hello, world!"),TimeSpan.FromMinutes(5));
何不取消任务重新调度
怎么取消任务
jobId怎么拿到?