public RecurrencyController(ILog log, RecurrencyRepository repo) { this.log = log; this.repo = repo; var config = RecurrencyConfigSection.GetConfig(); if (config != null) { log.Info("Reading config. Found cron items: " + config.CronTab.Count); foreach (RecurrencyConfigElement cron in config.CronTab) { if (cron.Recreate) { var e = repo.GetExact(cron.Cron, cron.TaskName); if (e != null) { repo.Delete(e); } } AddSchedule(cron.Cron, cron.TaskName); } } }
public RecurrencyController(ILog log, RecurrencyRepository repo) { this.log = log; this.repo = repo; var config = RecurrencyConfigSection.GetConfig(); if (config != null) { log.Info("Reading config. Found cron items: " + config.CronTab.Count); foreach (RecurrencyConfigElement cron in config.CronTab) { if(cron.Recreate) { var e = repo.GetExact(cron.Cron, cron.TaskName); if(e!=null) repo.Delete(e); } AddSchedule(cron.Cron, cron.TaskName); } } }