Prior to this change, both * and 0 were treated the same when in the hour position. That meant that the following string:
*/5 0 * * *
would return the following description:
Every 5 minutes
Which is incorrect. Instead, cron will run that job every 5 minutes only during the 0th hour. Since * means "every hour of the day" but 0 specifically means "the 0th hour" -- midnight, aka 0:00 aka 12:00 AM -- both * and 0 cannot be treated equally when in the hour position.
This fixes the parsing such that 0 will properly return what it actually means -- only during the 12:00 AM hour.
Other libraries on which this gem are based do handle this case properly. For example, the C# version.
Prior to this change, both
*
and0
were treated the same when in the hour position. That meant that the following string:would return the following description:
Which is incorrect. Instead, cron will run that job every 5 minutes only during the 0th hour. Since
*
means "every hour of the day" but0
specifically means "the 0th hour" -- midnight, aka 0:00 aka 12:00 AM -- both*
and0
cannot be treated equally when in the hour position.This fixes the parsing such that
0
will properly return what it actually means -- only during the 12:00 AM hour.Other libraries on which this gem are based do handle this case properly. For example, the C# version.
With
*
in hour positionWith
0
in hour position