private void ProcessFile(JobFile jobFile) { if ((jobFile == null) || (jobFile.FileFound == false)) { return; } try { XMLSchedulingDataProcessor processor = new XMLSchedulingDataProcessor(TypeLoadHelper); processor.AddJobGroupToNeverDelete(JobInitializationPluginName); processor.AddTriggerGroupToNeverDelete(JobInitializationPluginName); processor.ProcessFileAndScheduleJobs( jobFile.FileName, jobFile.FileName, // systemId scheduler); } catch (Exception e) { var message = "Could not schedule jobs and triggers from file " + jobFile.FileName + ": " + e.Message; if (FailOnSchedulingError) { throw new SchedulerException(message, e); } else { Log.Error(message, e); } } }
private async Task ProcessFile(JobFile?jobFile, CancellationToken cancellationToken = default) { if (jobFile == null || jobFile.FileFound == false) { return; } try { XMLSchedulingDataProcessor processor = new XMLSchedulingDataProcessor(TypeLoadHelper); processor.AddJobGroupToNeverDelete(JobInitializationPluginName); processor.AddTriggerGroupToNeverDelete(JobInitializationPluginName); await processor.ProcessFileAndScheduleJobs( jobFile.FileName, jobFile.FileName, // systemId Scheduler, cancellationToken).ConfigureAwait(false); } catch (Exception e) { var message = "Could not schedule jobs and triggers from file " + jobFile.FileName + ": " + e.Message; if (FailOnSchedulingError) { throw new SchedulerException(message, e); } else { Log.ErrorException(message, e); } } }
private async Task ProcessFile(JobFile jobFile, CancellationToken cancellationToken = default(CancellationToken)) { if ((jobFile == null) || (jobFile.FileFound == false)) { return; } try { XMLSchedulingDataProcessor processor = new XMLSchedulingDataProcessor(TypeLoadHelper); processor.AddJobGroupToNeverDelete(JobInitializationPluginName); processor.AddTriggerGroupToNeverDelete(JobInitializationPluginName); await processor.ProcessFileAndScheduleJobs( jobFile.FileName, jobFile.FileName, // systemId Scheduler, cancellationToken).ConfigureAwait(false); } catch (Exception e) { Log.ErrorException("Error scheduling jobs: " + e.Message, e); } }
private void ProcessFile(JobFile jobFile) { if ((jobFile == null) || (jobFile.FileFound == false)) { return; } try { XMLSchedulingDataProcessor processor = new XMLSchedulingDataProcessor(TypeLoadHelper); processor.AddJobGroupToNeverDelete(JobInitializationPluginName); processor.AddTriggerGroupToNeverDelete(JobInitializationPluginName); processor.ProcessFileAndScheduleJobs( jobFile.FileName, jobFile.FileName, // systemId scheduler); } catch (Exception) { } }
private void ProcessFile(JobFile jobFile) { if ((jobFile == null) || (jobFile.FileFound == false)) { return; } try { XMLSchedulingDataProcessor processor = new XMLSchedulingDataProcessor(TypeLoadHelper); processor.AddJobGroupToNeverDelete(JobInitializationPluginName); processor.AddTriggerGroupToNeverDelete(JobInitializationPluginName); processor.ProcessFileAndScheduleJobs( jobFile.FileName, jobFile.FileName, // systemId scheduler); } catch (Exception e) { Log.Error("Error scheduling jobs: " + e.Message, e); } }