{"record":{"id":"8037ad6ca10571fa","repo":"temporalio/temporal","slug":"s-missing-step-value","errorCode":null,"errorMessage":"%s missing step value","messagePattern":"(.+?) missing step value","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"service/worker/scheduler/calendar.go","lineNumber":434,"sourceCode":"\t\treturn nil, nil // special case for year: all is represented as empty range list\n\t}\n\tvar ranges []*schedulepb.Range\n\tfor part := range strings.SplitSeq(s, \",\") {\n\t\tvar err error\n\t\tstep := 1\n\t\thasStep := false\n\t\tslashes := strings.Count(part, \"/\")\n\t\tif slashes > 1 {\n\t\t\t// Inputs like \"3/5/7\" should yield the canonical \"too many slashes\" error\n\t\t\t// (instead of a later strconv parse error) so tests get consistent results.\n\t\t\treturn nil, fmt.Errorf(\"%s has too many slashes\", field)\n\t\t}\n\t\tif slashes == 1 {\n\t\t\t// A single slash introduces an integer step.\n\t\t\tskipParts := strings.SplitN(part, \"/\", 2)\n\t\t\t// Count==1 guarantees len==2; only need to ensure the right side is non-empty.\n\t\t\tif skipParts[1] == \"\" { // e.g. \"5/\"\n\t\t\t\treturn nil, fmt.Errorf(\"%s missing step value\", field)\n\t\t\t}\n\t\t\tpart = skipParts[0]\n\t\t\tstep, err = strconv.Atoi(skipParts[1])\n\t\t\tif err != nil {\n\t\t\t\treturn nil, err\n\t\t\t}\n\t\t\tif step < 1 {\n\t\t\t\treturn nil, fmt.Errorf(\"%s has invalid Step\", field)\n\t\t\t}\n\t\t\thasStep = true\n\t\t}\n\n\t\tstart, end := minVal, maxVal\n\t\tif part != \"*\" {\n\t\t\tif strings.Contains(part, \"-\") {\n\t\t\t\t// Only a single dash is allowed to denote a range (e.g. \"1-5\").\n\t\t\t\t// Inputs with multiple dashes like \"1-5-7\" should raise the\n\t\t\t\t// canonical \"too many dashes\" error expected by tests.","sourceCodeStart":416,"sourceCodeEnd":452,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/worker/scheduler/calendar.go#L416-L452","documentation":"When a cron spec part contains exactly one '/' but nothing after it (e.g. \"5/\"), makeRange cannot parse a step value and returns this error naming the field. The slash requires an integer step on the right-hand side.","triggerScenarios":"A schedule spec field part ends with a trailing slash, e.g. Minute=\"5/\" or \"*/\", produced by templating bugs or truncated configuration strings.","commonSituations":"YAML/config templating that drops the step value after '/', users editing schedule specs by hand and leaving a dangling '/', programmatic string building that appends '/' unconditionally.","solutions":["Provide a step value after the slash: \"5/\" → \"5/2\" (or just \"5\").","Strip trailing slashes or validate the spec before submitting.","Check config/templating for variable substitution that rendered an empty step.","Use a cron expression validator/linter in your tooling."],"exampleFix":"// before\nspec := \"*/\" // missing step\n// after\nspec := \"*/5\"","handlingStrategy":"validation","validationCode":"func hasStepValue(part string) bool {\n    i := strings.Index(part, \"/\")\n    return i == -1 || (i+1 < len(part) && part[i+1:] != \"\")\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Trim and validate cron parts for trailing slashes before submission.","Guard templated specs so empty variables don't render as 'x/'.","Add a unit test for every scheduler spec shipped in config."],"tags":["go","scheduler","cron","validation","parsing"],"backgroundTag":"invalid-cron-spec","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}