You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a cron expression has trailing whitespace, Croner appears to ‘hallucinate’ an extra (empty?) field. At a first guess I'd suggest that maybe it chooses mode depending on the number of results from something like string.split().
Expected behavior
A clear and concise description of what you expected to happen.
I'd expect it to either trim the input expression and ignore extraneous whitespace, or failing that, throw an error. It's very surprising to get different results based on a trailing space.
System:
OS: Linux
Runtime: Node.js 16
Croner version: 7.0.0
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
When using a trailing space together with a five part pattern, it's treated as a six part pattern with an empty instruction for weekdays - which interestingly enough is accepted and treated as a wildcard. I will figure out a good solution to this, along with some additional tests.
Describe the bug
If a cron expression has trailing whitespace, Croner appears to ‘hallucinate’ an extra (empty?) field. At a first guess I'd suggest that maybe it chooses mode depending on the number of results from something like string.split().
To Reproduce
→
But
→
Expected behavior
A clear and concise description of what you expected to happen.
I'd expect it to either trim the input expression and ignore extraneous whitespace, or failing that, throw an error. It's very surprising to get different results based on a trailing space.
System:
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: