{"record":{"id":"0d7fc459ed5e35f5","repo":"argoproj/argo-workflows","slug":"failed-to-create-cron-workflow-w","errorCode":null,"errorMessage":"failed to create cron workflow: %w","messagePattern":"failed to create cron workflow: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/argo/commands/cron/create.go","lineNumber":93,"sourceCode":"\t\t// that includes name and generateName. Here we copy the metadata to the cron\n\t\t// workflow's metadata and remove the unnecessary and mutually exclusive part.\n\t\tif generateName := newWf.GenerateName; generateName != \"\" {\n\t\t\tcronWf.GenerateName = generateName\n\t\t\tcronWf.Name = \"\"\n\t\t}\n\t\tif name := newWf.Name; name != \"\" {\n\t\t\tcronWf.Name = name\n\t\t\tcronWf.GenerateName = \"\"\n\t\t}\n\t\tif cronWf.Namespace == \"\" {\n\t\t\tcronWf.Namespace = client.Namespace(ctx)\n\t\t}\n\t\tcreated, err := serviceClient.CreateCronWorkflow(ctx, &cronworkflowpkg.CreateCronWorkflowRequest{\n\t\t\tNamespace:    cronWf.Namespace,\n\t\t\tCronWorkflow: &cronWf,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"failed to create cron workflow: %w\", err)\n\t\t}\n\t\tfmt.Print(getCronWorkflowGet(ctx, created))\n\t}\n\treturn nil\n}\n","sourceCodeStart":75,"sourceCodeEnd":99,"githubUrl":"https://github.com/argoproj/argo-workflows/blob/35bff19146f5a6ada77468c431f2624bd577e373/cmd/argo/commands/cron/create.go#L75-L99","documentation":"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.","triggerScenarios":"Thrown at cmd/argo/commands/cron/create.go:93 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","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"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"35bff19146f5a6ada77468c431f2624bd577e373","analyzedAt":"2026-09-03T19:34:35.908Z","contentChangedAt":"2026-09-03T19:34:35.908Z","schemaVersion":2},"datasetVersion":"2026-09-08T15:18:49.778Z"}