示例:在一天当中的13:00到14:00不要执行
public async static Task Test() { var scheduler = await StdSchedulerFactory.GetDefaultScheduler(); await scheduler.Start(); DailyCalendar dailyCalendar = new DailyCalendar(DateBuilder.DateOf(13,0,0).DateTime, DateBuilder.DateOf(14,0,0).DateTime); var job = JobBuilder.Create<MyJob>().WithIdentity("MyJob").Build(); var trigger = TriggerBuilder.Create().WithDailyTimeIntervalSchedule( d => d.OnEveryDay() .StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(8, 30)) .EndingDailyAt(TimeOfDay.HourAndMinuteOfDay(22, 00)) .WithIntervalInSeconds(1) ) .ModifiedByCalendar("myCalendar") .Build(); await scheduler.AddCalendar("myCalendar", dailyCalendar, true,true); await scheduler.ScheduleJob(job, trigger); }