argoproj/argo-workflows · error

start date should not be empty

Error message

start date should not be empty

What it means

backfillCronWorkflow requires an explicit --start date to delimit the backfill window. This validation guard fires when the user runs 'argo cron backfill' without providing --start (or provides an empty value), giving the command no beginning of the time range over which to create catch-up workflow runs.

Source

Thrown at cmd/argo/commands/cron/backfill.go:73

			cliOps.cronWfName = args[0]
			return backfillCronWorkflow(cmd.Context(), args[0], cliOps)
		},
	}
	command.Flags().StringVar(&cliOps.name, "name", "", "Backfill name")
	command.Flags().StringVar(&cliOps.startDate, "start", "", "Start date")
	command.Flags().StringVar(&cliOps.endDate, "end", "", "End Date")
	command.Flags().BoolVar(&cliOps.parallel, "parallel", false, "Enabled all backfile workflows run parallel")
	command.Flags().StringVar(&cliOps.argName, "argname", "cronScheduleTime", "Schedule time argument name for workflow")
	command.Flags().StringVar(&cliOps.dateFormat, "format", time.RFC1123, "Date format for Schedule time value")
	command.Flags().IntVar(&cliOps.maxWorkflowCount, "maxworkflowcount", 1000, "Maximum number of generated backfill workflows")

	return command
}

func backfillCronWorkflow(ctx context.Context, cronWFName string, cliOps backfillOpts) error {
	if cliOps.startDate == "" {
		return fmt.Errorf("start date should not be empty")
	}
	startTime, err := time.Parse(cliOps.dateFormat, cliOps.startDate)
	if err != nil {
		return err
	}
	var endTime time.Time
	if cliOps.endDate != "" {
		endTime, err = time.Parse(cliOps.dateFormat, cliOps.endDate)
		if err != nil {
			return err
		}
	} else {
		endTime = time.Now()
		cliOps.endDate = endTime.Format(time.RFC1123)
	}

	ctx, apiClient, err := client.NewAPIClient(ctx)
	if err != nil {

View on GitHub (pinned to 35bff19146)

Solutions

  1. Pass --start with a date in the expected --format (default YYYY-MM-DD)
  2. Optionally also pass --end to bound the backfill
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at cmd/argo/commands/cron/backfill.go:73 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of argoproj/argo-workflows@35bff19146 (2026-09-03). Data as JSON: /api/errors/60ff95be4f79c5f7. Report an issue: GitHub.