Start Time of Day is not set correctly in DailyTimeIntervalTriggerPersistenceDelegate::GetTriggerProperties #98

Closed
deanward81 opened this Issue Feb 11, 2013 · 4 comments

Projects

None yet

3 participants

@deanward81

lines 75 - 77 read...

                timeOfDayBuffer.Append(startTimeOfDay.Minute).Append(",");
                timeOfDayBuffer.Append(startTimeOfDay.Second).Append(",");
                timeOfDayBuffer.Append(startTimeOfDay.Hour).Append(",");

they should probably read (same as endTimeOfDay)

                timeOfDayBuffer.Append(startTimeOfDay.Hour).Append(",");
                timeOfDayBuffer.Append(startTimeOfDay.Minute).Append(",");
                timeOfDayBuffer.Append(startTimeOfDay.Second).Append(",");

At the moment, reading in the properties from a trigger in an ADO.NET job store throws this exception...

Couldn't retrieve trigger: Hour must be from 0 to 23
Quartz.JobPersistenceException: Couldn't retrieve trigger: Hour must be from 0 to 23 ---> System.ArgumentException: Hour must be from 0 to 23
at Quartz.TimeOfDay.Validate() in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\TimeOfDay.cs:line 86
at Quartz.Impl.AdoJobStore.DailyTimeIntervalTriggerPersistenceDelegate.GetTriggerPropertyBundle(SimplePropertiesTriggerProperties props) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\DailyTimeIntervalTriggerPersistenceDelegate.cs:line 140
at Quartz.Impl.AdoJobStore.SimplePropertiesTriggerPersistenceDelegateSupport.LoadExtendedTriggerProperties(ConnectionAndTransactionHolder conn, TriggerKey triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\SimplePropertiesTriggerPersistenceDelegateSupport.cs:line 176
at Quartz.Impl.AdoJobStore.StdAdoDelegate.SelectTrigger(ConnectionAndTransactionHolder conn, TriggerKey triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\StdAdoDelegate.cs:line 1510
at Quartz.Impl.AdoJobStore.JobStoreSupport.RetrieveTrigger(ConnectionAndTransactionHolder conn, TriggerKey triggerKey) in c:\Work\OpenSource\Quartz.NET\quartznet\src\Quartz\Impl\AdoJobStore\JobStoreSupport.cs:line 1315

@deanward81

This is actually a dupe of #93

@lahma
Member
lahma commented Feb 18, 2013

Closing as duplicate

@lahma lahma closed this Feb 18, 2013
@deanward81

Actually this isn't a dupe - it's a different issue. The code at the top of the issue needs to be applied in DailyTimeIntervalTriggerPersistenceDelegate::GetTriggerProperties for it to be fixed.

@lahma lahma reopened this Feb 20, 2013
@smartaypants

I am also experiencing this problem (saving 01:00:00 is read back as 00:00:01).
The fix is as above.

@lahma lahma added a commit that closed this issue Feb 20, 2013
@lahma lahma fixes #98 Start Time of Day is not set correctly in DailyTimeInterval…
…TriggerPersistenceDelegate.GetTriggerProperties
f5df0ae
@lahma lahma closed this in f5df0ae Feb 20, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment