public void StopJob() { var result = QuartzHelpers.removeJob(JobName, TriggerName, GroupName); if (result) { Logs.Write(LogFile, $"[{LogPrefix}]Stop Success"); } else { Logs.Write(LogFile, $"[{LogPrefix}]Stop Error"); } }
public static void init() { Logs.WriteCurrent("[Main] App Start"); Logs.WriteCurrent($"[Main] {Config.Instance.AppEntities.Count} Apps Will Run"); var i = 0; foreach (var instanceAppEntity in Config.Instance.AppEntities) { instanceAppEntity.JobName = $"Job{i}"; instanceAppEntity.TriggerName = $"TriggerName{i}"; instanceAppEntity.GroupName = "group0"; var job = QuartzHelpers.StartAsync <App>(instanceAppEntity.CronJob, instanceAppEntity.JobName, instanceAppEntity.TriggerName, instanceAppEntity.GroupName, instanceAppEntity); SchedulerList.Add(job); i++; } }