{"record":{"id":"0623854a09dc9275","repo":"hashicorp/nomad","slug":"specified-job-q-is-not-a-parameterized-job","errorCode":null,"errorMessage":"Specified job %q is not a parameterized job","messagePattern":"Specified job %q is not a parameterized job","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"nomad/job_endpoint.go","lineNumber":2027,"sourceCode":"\tif args.JobID == \"\" {\n\t\treturn fmt.Errorf(\"missing parameterized job ID\")\n\t}\n\n\tsnap, err := j.srv.fsm.State().Snapshot()\n\tif err != nil {\n\t\treturn err\n\t}\n\tws := memdb.NewWatchSet()\n\tparameterizedJob, err := snap.JobByID(ws, args.RequestNamespace(), args.JobID)\n\tif err != nil {\n\t\treturn err\n\t}\n\tif parameterizedJob == nil {\n\t\treturn fmt.Errorf(\"parameterized job not found\")\n\t}\n\n\tif !parameterizedJob.IsParameterized() {\n\t\treturn fmt.Errorf(\"Specified job %q is not a parameterized job\", args.JobID)\n\t}\n\n\tif parameterizedJob.Stop {\n\t\treturn fmt.Errorf(\"Specified job %q is stopped\", args.JobID)\n\t}\n\n\t// Set priority to match parent job if unset\n\tif args.Priority == 0 {\n\t\targs.Priority = parameterizedJob.Priority\n\t}\n\n\t// Validate the arguments and parameterized job\n\tagentConfig := j.srv.config\n\tif err := validateDispatchRequest(args, parameterizedJob, agentConfig); err != nil {\n\t\treturn err\n\t}\n\n\t// Avoid creating new dispatched jobs for retried requests, by using the","sourceCodeStart":2009,"sourceCodeEnd":2045,"githubUrl":"https://github.com/hashicorp/nomad/blob/482b49bf1aec006f089bcfc7e632d8f6ac303e5e/nomad/job_endpoint.go#L2009-L2045","documentation":"The job was found by ID, but its ParameterizedJob block is not configured, so IsParameterized() returns false. Dispatch only works on parameterized jobs; a regular batch/service job cannot be dispatched.","triggerScenarios":"Calling Dispatch (or `nomad job dispatch`) on a normal job that has no `parameterized` stanza in its job spec.","commonSituations":"Copy-pasting a dispatch command meant for one job onto a regular job; a job spec was edited and the parameterized stanza removed while scripts still dispatch it; confusion between periodic and parameterized jobs (periodic jobs use `nomad job periodic`, not dispatch).","solutions":["Add a `parameterized` stanza to the job spec and resubmit it, or use `nomad job periodic` if it is a periodic job","Use the correct job that is actually parameterized","For periodic jobs, use `nomad job periodic <job-id>` instead of dispatch"],"exampleFix":"// before (job has no parameterized stanza)\njob \"batch\" { type = \"batch\" }\n// after\njob \"batch\" {\n  type = \"batch\"\n  parameterized {\n    payload       = \"optional\"\n    meta_required = [\"run_id\"]\n  }\n}","handlingStrategy":"validation","validationCode":"job, _, _ := client.Jobs().Info(jobID, nil)\nif job == nil || job.ParameterizedJob == nil {\n    return fmt.Errorf(\"%s is not a parameterized job; use dispatch only on parameterized jobs\", jobID)\n}","typeGuard":"func isParameterized(j *api.Job) bool { return j != nil && j.ParameterizedJob != nil }","tryCatchPattern":null,"preventionTips":["Check the job spec contains a parameterized stanza before dispatching","Use `nomad job periodic` for periodic jobs, not dispatch","Keep a registry of which jobs are dispatchable"],"tags":["nomad","api","job-spec","parameterized-job"],"backgroundTag":"invalid-operation-for-resource-type","analyzedSha":"482b49bf1aec006f089bcfc7e632d8f6ac303e5e","analyzedAt":"2026-09-04T07:54:14.808Z","contentChangedAt":"2026-09-04T07:54:14.808Z","schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}