public void Configure(IServiceCollectionQuartzConfigurator configurator) { configurator.ScheduleJob <SomeTask>( trigger => trigger .StartNow() .WithSimpleSchedule(x => x.WithRepeatCount(0)) ); }
public void Configure(IServiceCollectionQuartzConfigurator config) { config.ScheduleJob <DispatchSubscriptionOrdersTask>(x => x .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(11, 0))); // config.ScheduleJob<OrderPurge>(x => x // .WithSchedule(CronScheduleBuilder.DailyAtHourAndMinute(11, 0))); }
public static IServiceCollectionQuartzConfigurator RegisterJob <TJob>(this IServiceCollectionQuartzConfigurator configurator, CommonSchedulerTaskProperties taskSettings) where TJob : class, IJob { var jobType = typeof(TJob); configurator.ScheduleJob <TJob>( trigger => trigger.WithIdentity(QuartzService.GetJobTriggerIdentity(jobType)) .WithDescription(QuartzService.GetJobTriggerDescription(jobType, taskSettings.Schedule)) .WithCronSchedule(taskSettings.Schedule), j => { j .WithIdentity(jobType.Name) .WithDescription(QuartzService.GetJobDescription(jobType, taskSettings.Description)); if (taskSettings.SpecifiedConditions != null) { j.UsingJobData(new JobDataMap(taskSettings.SpecifiedConditions)); } }); return(configurator); }
public void Configure(IServiceCollectionQuartzConfigurator config) { config.ScheduleJob <ProcessMonthlyDonationsTask>(x => x .StartNow() .WithSchedule(CronScheduleBuilder.MonthlyOnDayAndHourAndMinute(1, 12, 0))); }