Quartz 添加job执行
private void ExecuteJob(int hour = 10, int min = 10, int ss = 0) { ISchedulerFactory factory = new StdSchedulerFactory(); IScheduler scheduler = factory.GetScheduler(); scheduler.Start(); IJobDetail jobDetail = JobBuilder.Create<ScheduleJob>().WithIdentity("dailyJob").Build(); ITrigger trigger = TriggerBuilder.Create() .WithIdentity("jobTrigger") .WithSimpleSchedule(x => x.WithIntervalInHours(24).RepeatForever()) .StartAt(DateBuilder.TodayAt(hour, min, ss)) .Build(); scheduler.ScheduleJob(jobDetail, trigger); }