temporalio/temporal · warning
%s missing step value
Error message
%s missing step value
What it means
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.
Source
Thrown at service/worker/scheduler/calendar.go:434
return nil, nil // special case for year: all is represented as empty range list
}
var ranges []*schedulepb.Range
for part := range strings.SplitSeq(s, ",") {
var err error
step := 1
hasStep := false
slashes := strings.Count(part, "/")
if slashes > 1 {
// Inputs like "3/5/7" should yield the canonical "too many slashes" error
// (instead of a later strconv parse error) so tests get consistent results.
return nil, fmt.Errorf("%s has too many slashes", field)
}
if slashes == 1 {
// A single slash introduces an integer step.
skipParts := strings.SplitN(part, "/", 2)
// Count==1 guarantees len==2; only need to ensure the right side is non-empty.
if skipParts[1] == "" { // e.g. "5/"
return nil, fmt.Errorf("%s missing step value", field)
}
part = skipParts[0]
step, err = strconv.Atoi(skipParts[1])
if err != nil {
return nil, err
}
if step < 1 {
return nil, fmt.Errorf("%s has invalid Step", field)
}
hasStep = true
}
start, end := minVal, maxVal
if part != "*" {
if strings.Contains(part, "-") {
// Only a single dash is allowed to denote a range (e.g. "1-5").
// Inputs with multiple dashes like "1-5-7" should raise the
// canonical "too many dashes" error expected by tests.View on GitHub (pinned to bde624efd1)
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.
Example fix
// before spec := "*/" // missing step // after spec := "*/5"
Defensive patterns
Strategy: validation
Validate before calling
func hasStepValue(part string) bool {
i := strings.Index(part, "/")
return i == -1 || (i+1 < len(part) && part[i+1:] != "")
} Prevention
- 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.
When it happens
Trigger: A schedule spec field part ends with a trailing slash, e.g. Minute="5/" or "*/", produced by templating bugs or truncated configuration strings.
Common situations: 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.
Related errors
- %s has too many slashes
- %s has too many dashes
- CronString has time zone but missing fields
- CronString does not have 5-7 fields
- CronString does not have interval after @every
AI-assisted analysis of temporalio/temporal@bde624efd1 (2026-09-01).
Data as JSON: /api/errors/8037ad6ca10571fa.
Report an issue: GitHub.