mirror of
https://github.com/InsanusMokrassar/krontab.git
synced 2025-12-11 15:36:13 +00:00
rewrite check onto fsm
This commit is contained in:
@@ -97,7 +97,7 @@ value class KrontabConfig(
|
||||
var millisecondsParsed: Array<Short>? = null
|
||||
val (secondsSource, minutesSource, hoursSource, dayOfMonthSource, monthSource) = template
|
||||
.split(" ")
|
||||
.filter { it.matches(KrontabConfigPartRegex) } // filter garbage from string
|
||||
.filter { checkIncomingPart(it) } // filter garbage from string
|
||||
.let {
|
||||
if (it.size < 5) { // reconstruction in case of insufficient arguments; 5 is amount of required arguments out of latest also code
|
||||
it + (it.size until 5).map { "*" }
|
||||
|
||||
Reference in New Issue
Block a user