argoproj/argo-workflows · error
failed to create cron workflow: %w
Error message
failed to create cron workflow: %w
What it means
CreateCronWorkflows wraps any error returned by the gRPC CreateCronWorkflow API call when submitting a new CronWorkflow to the server. It fires when the server rejects the creation — commonly due to invalid cron schedule syntax, RBAC denial, an already-existing name, or namespace problems — and preserves the underlying cause via %w.
Source
Thrown at cmd/argo/commands/cron/create.go:93
// that includes name and generateName. Here we copy the metadata to the cron
// workflow's metadata and remove the unnecessary and mutually exclusive part.
if generateName := newWf.GenerateName; generateName != "" {
cronWf.GenerateName = generateName
cronWf.Name = ""
}
if name := newWf.Name; name != "" {
cronWf.Name = name
cronWf.GenerateName = ""
}
if cronWf.Namespace == "" {
cronWf.Namespace = client.Namespace(ctx)
}
created, err := serviceClient.CreateCronWorkflow(ctx, &cronworkflowpkg.CreateCronWorkflowRequest{
Namespace: cronWf.Namespace,
CronWorkflow: &cronWf,
})
if err != nil {
return fmt.Errorf("failed to create cron workflow: %w", err)
}
fmt.Print(getCronWorkflowGet(ctx, created))
}
return nil
}
View on GitHub (pinned to 35bff19146)
Solutions
- Check the wrapped error for the server-side cause
- Verify the cron workflow YAML passes argo lint
- Ensure RBAC allows creating cronworkflows in the namespace
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at cmd/argo/commands/cron/create.go:93 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/0d7fc459ed5e35f5.
Report an issue: GitHub.