Issue Details (XML | Word | Printable)

Key: QRTZNET-20
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Marko Lahma
Reporter: Marko Lahma
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Quartz.NET

CronExpression fails when minute is incremented to 60

Created: 23/Jul/07 02:55 AM   Updated: 30/Jan/08 04:00 PM
Component/s: Triggers
Affects Version/s: None
Fix Version/s: 0.6

Issue Links:
Duplicate
 


 Description  « Hide
From Grafit (http://groups.google.com/group/quartznet/browse_thread/thread/efb2582df3a6f1b4?hl=en):

CronExpression seems to have some faulty code - it doesn't handle hour
shift properly.
In GetTimeAfter, line 1358 (or smth. near)
we have code

 min++;
 d = new DateTime(d.Year, d.Month, d.Day, d.Hour, min, d.Second,
d.Millisecond);

that raises exceptions when minute was 59 - it merely gets erratically
equal to 60.
Replaced it with

                   d = d.AddMinutes(1);
and it works, but I'm a little nervous since I may have broken some
deep ideas :)).

The error occured when I made a CronTrigger launch every 5 seconds and
excluded the current day using AnnualCalendar - when GetTimeAfter is
supplied a date like (xx : 59 : 55) it fails.

 All   Comments   Change History      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.