private IJobDetail CreateJob(JobMetadata jobMetadata) { return(JobBuilder .Create(jobMetadata.JobType) .WithIdentity(jobMetadata.JobId.ToString()) .WithDescription($"{jobMetadata.JobName}") .Build()); }
private ITrigger CreateTrigger(JobMetadata jobMetadata) { return(TriggerBuilder.Create() .WithIdentity(jobMetadata.JobId.ToString()) .WithCronSchedule(jobMetadata.CronExpression) .WithDescription($"{jobMetadata.JobName}") .Build()); }
private ITrigger CreateTrigger(JobMetadata jobMetadata) { return(TriggerBuilder.Create() .WithIdentity(jobMetadata.JobId.ToString()) .WithCronSchedule(jobMetadata.CronExpression) .WithDescription($"{jobMetadata.JobName}") .WithDailyTimeIntervalSchedule(s => s.InTimeZone(jobMetadata.TimeZoneInfo)) .Build()); }
public QuartzMultaHostedService(ISchedulerFactory schedulerFactory, JobMetadata jobMetadata, IJobFactory jobFactory) { this.schedulerFactory = schedulerFactory; this.jobMetadata = jobMetadata; this.jobFactory = jobFactory; }