I have Quartz.NET installed and running in my ASP.NET MVC app. It's working fine for 1 job but as soon as I add in a second job all of the jobs fire 2-3 times each. Here is the code I have to schedule the jobs:
private void ScheduleAll(HttpApplication context)
ISchedulerFactory schedFact = new StdSchedulerFactory();
IScheduler sched = schedFact.GetScheduler();
// Schedule All Daily Emails
IJobDetail dailyEmailJob = JobBuilder.Create<DailyEmails>().WithIdentity("DailyEmailJob", "DailyEmailGroup").Build();
dailyEmailJob.JobDataMap["context"] = HttpContext.Current;
ITrigger dailyEmailTrigger = TriggerBuilder.Create().WithDailyTimeIntervalSchedule(s => s.WithIntervalInHours(24).OnEveryDay().StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(3, 0))).Build();
// Nightly Maintenance
IJobDetail scheduledMaintenanceJob = JobBuilder.Create<ScheduledMaintenance>().WithIdentity("ScheduledMaintenanceJob", "ScheduledMaintenanceGroup").Build();
scheduledMaintenanceJob.JobDataMap["context"] = HttpContext.Current;
ITrigger scheduledMaintenanceTrigger = TriggerBuilder.Create().WithDailyTimeIntervalSchedule(s => s.WithIntervalInHours(24).OnEveryDay().StartingDailyAt(TimeOfDay.HourAndMinuteOfDay(1, 0))).Build();
It seems to be running 3 times on Mondays and 1 time the other days of the week. I used to have it configured to run certain jobs on Mondays and others every day of the week but that would also run the jobs multiple times so I stopped that and began running the job every day and using c# to determine the day of the week and thus which code to execute.
Could it be that the jobs are queuing up on the server somehow from past schedules?