Expression not matching when expected
Closed this issue · 1 comments
GoogleCodeExporter commented
What steps will reproduce the problem?
1. Create the following expression:
'10 1 * * *'
2. Use the following start and end DateTimes:
START: 3/2/2010 1:10:00 AM
END: 3/2/2010 1:15:00 AM
What is the expected output? What do you see instead?
Expected Results: 1 match
Actual Results: no match at all
What version of the product are you using? On what operating system?
AssemblyVersion("0.2.10124.0")
AssemblyFileVersion("0.2.10124.1211")
Windows XP / .NET 3.5
Please provide any additional information below.
-
Original issue reported on code.google.com by wda...@gmail.com
on 2 Mar 2010 at 10:14
GoogleCodeExporter commented
This behavior is by-design. The CrontabSchedule method that produces
occurrences is
called GetNextOccurrences. The *next* means not including the start time if the
start
time is on the boundary of the schedule. So, for example, if it is midnight and
you
have the expression * * * * * (meaning every minute) then the next occurrence
of the
schedule will be at one minute past midnight and not midnight itself. In your
example, there are no matches because the start time of 1:10 AM lies on the
schedule
and there is no next occurrence until 1:15 AM. If you want to absolutely make
sure
that the first boundary case is included, then you should minus one minute or
less
from the starting time.
This issue is being closed as WontFix because GetNextOccurrence works as
advertised.
The documentation of the methods, however, has been expanded to explain the
behavior
more precisely with respect to certain input cases.
Original comment by azizatif
on 21 Mar 2010 at 1:21
- Changed state: WontFix
- Added labels: Component-Logic