As part of our deployment process the Telligent Task Service on our test environment is updated with every deployment, on Monday the service deployment started to fail due to the service not starting. Looking back through the checkin history there were no changes that stood out as being the cause, so it was time to dig a little deeper.
Looking at the error log file produced by the service I could see the following error message:
2015-03-24 11:38:48,587  ERROR Telligent.JobScheduler.JobsManager [(null)] - System.Configuration.ConfigurationErrorsException: There was an error creating the cron scheduler. Ensure configuration values are set correctly. Check the inner exception for more details. ---> System.ArgumentException: The supplied DateTime represents an invalid time. For example, when the clock is adjusted forward, any time in the period that is skipped is invalid.Parameter name: dateTime at System.TimeZoneInfo.ConvertTime(DateTime dateTime, TimeZoneInfo sourceTimeZone, TimeZoneInfo destinationTimeZone, TimeZoneInfoOptions flags, CachedData cachedData) at System.TimeZoneInfo.ConvertTimeToUtc(DateTime dateTime, TimeZoneInfo sourceTimeZone) at Quartz.CronExpression.GetTimeAfter(DateTime afterTimeUtc) at Quartz.CronTrigger.GetTimeAfter(DateTime afterTime) at Quartz.CronTrigger.GetFireTimeAfter(Nullable`1 afterTimeUtc) at Quartz.CronTrigger.ComputeFirstFireTimeUtc(ICalendar cal) at Quartz.Core.QuartzScheduler.ScheduleJob(SchedulingContext ctxt, JobDetail jobDetail, Trigger trigger) at Quartz.Impl.StdScheduler.ScheduleJob(JobDetail jobDetail, Trigger trigger) at Telligent.JobScheduler.Hosting.CronJobsApplication.LoadTasks(CronSchedulerConfigurationElement config, IScheduler scheduler) at Telligent.JobScheduler.Hosting.JobsApplication.Initialize(SchedulerConfigurationElement config) at Telligent.JobScheduler.Hosting.CronJobsApplication.Start() --- End of inner exception stack trace --- at Telligent.JobScheduler.Hosting.CronJobsApplication.Start() at Telligent.JobScheduler.Hosting.RuntimeHost.StartPrivate() at Telligent.JobScheduler.Hosting.RuntimeHost.Start(TimeSpan timeout) at Telligent.JobScheduler.JobsManager.Start() at ..OnStart(String args)
This seemed odd, as none of the tasks declarations had changed since the service was last deployed before the weekend. Removing all the Job declarations from the tasks.config file allowed the service to start so there was obviously a problem with one of those, adding the jobs back in slowly narrowed the problem down to the following entry:
Then the error messages started to make sense, the next scheduled run of the job is 10 seconds past 1AM on Sunday (29th March 2015), Daylight Savings time starts at 1AM on Sunday, with the clocks going forward 1 hour, meaning there is no 10 seconds past 1AM this week, so the job couldn't be scheduled.
Changing the scheduled time allowed the job to start correctly.