private void ApplyInvoices() { var cronInvoices = _appConfigurationProvider.GetValue("Scheduling:CronExpression:InvoicesJob"); var invoicesJobOption = _appConfigurationProvider.GetValue("Scheduling:StartProcessOption:StartInvoicesJobOption"); var invoicesGroup = "InvoicesGroup"; var invoicesJob = CreateJobDetail <InvoicesJob>("InvoicesJob", invoicesGroup); var invoicesTrigger = CreateTrigger("InvoicesTrigger", invoicesGroup, cronInvoices, (RunJobScheduleOption)invoicesJobOption.ParseToNumber()); _scheduler.ScheduleJob(invoicesJob, invoicesTrigger).ConfigureAwait(false) .GetAwaiter() .GetResult(); }
public string GetValueFromConfiguration(string sectionName) { return(_appConfigurationProvider.GetValue(sectionName)); }