Beispiel #1
0
 public IActionResult RestartJob(JobTypeEnum?jobType)
 {
     if (jobType == null)
     {
         throw new Exception($"JobType '{ControllerContext.RouteData.Values[nameof(jobType)]}' is not defined.");
     }
     QuartzScheduler.RestartJob(jobType.Value);
     return(Ok($"Task '{jobType}' has been restarted."));
 }