我正在尝试开始使用 Quartz.Net 2.0。一个非常简单的测试应用程序失败了SchedulerException
触发器的相关作业名称不能为空
代码改编自版本 2.0迁移指南
ISchedulerFactory schedFact = new StdSchedulerFactory();
IScheduler classSched = schedFact.GetScheduler();
classSched.Start();
IJobDetail job = JobBuilder.Create<ClassificationJob>()
.WithIdentity("myJob", "My Group")
.WithDescription("My Description")
.Build();
TimeZoneInfo tzUtc = TimeZoneInfo.Utc;
DateTime startTime;
startTime = DateTime.UtcNow;
ITrigger trigger = TriggerBuilder.Create()
.WithIdentity("myTrigger", "My Group")
.WithDescription("My Description")
.StartAt(startTime)
.WithSimpleSchedule(x => x.WithIntervalInSeconds(10).RepeatForever())
.Build();
classSched.ScheduleJob(trigger); // Exception on this line
为什么会失败?