diff --git a/crontab_test.go b/crontab_test.go index 78ce2f8..8a32427 100644 --- a/crontab_test.go +++ b/crontab_test.go @@ -79,7 +79,7 @@ func TestParseIntervalPlus(t *testing.T) { log.SetFlags(log.Llongfile) - crontab := "f2|f2?3|f3?4|1|t4?5" + crontab := "f2|f2>3|f3>4|1|s4>5" cron := NewCrontab(crontab) i := 0 diff --git a/interval_base.go b/interval_base.go index 2d65003..3512525 100644 --- a/interval_base.go +++ b/interval_base.go @@ -73,7 +73,7 @@ func parseIntervalString(crontab string) []interface{} { switch FN[0] { case 'f', 'F': - scharIndex := strings.Index(FN, "?") + scharIndex := strings.Index(FN, ">") if scharIndex != -1 { fc := FN[0:scharIndex] @@ -89,8 +89,8 @@ func parseIntervalString(crontab string) []interface{} { interval.PlanFail = append(interval.PlanFail, parseRandLR(fvalue)) } - case 't', 'T': - scharIndex := strings.Index(FN, "?") + case 's', 'S': + scharIndex := strings.Index(FN, ">") if scharIndex != -1 { tc := FN[0:scharIndex] tlr := FN[scharIndex+1:] @@ -106,8 +106,8 @@ func parseIntervalString(crontab string) []interface{} { } default: - FN = "t" + FN - scharIndex := strings.Index(FN, "?") + FN = "s" + FN + scharIndex := strings.Index(FN, ">") if scharIndex != -1 { tc := FN[0:scharIndex] tlr := FN[scharIndex+1:]