The current order of precedence of token's operators (',' '/' and '-') during the parsing brings to incorrect results.
For example, '5-8,*/2' is evaluated to 'any time unit'.
Indeed the '/' is the first operator sought, giving intermediary result 'every 2 time unit'.
Then the token is reduced to '5-8,*' and finally to '5-8' and '*', the last giving 'any time unit' over all others.
The correct ordre of precedence should be :
1 : ','
2 : '/'
3 : '-'
and not '/' first as currently.
Another consequence is that '*/2,5-8' results to an exception because the method tries to parse the supposed integer '2,5-8' as the periodicity.
The correction is very simple. Attached the file 'CrontabParser.java'. The change is located in the 'parseToken' method.
Regards,
Olivier Barbeau
change is located in the 'parseToken' method