{"record":{"id":"69e46de00a7f1722","repo":"alibaba/spring-cloud-alibaba","slug":"update-schedulerx-job-failed-jobname-message","errorCode":null,"errorMessage":"update schedulerx job failed, jobName={}, message={}","messagePattern":"update schedulerx job failed, jobName=(.+?), message=(.+?)","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/service/JobSyncService.java","lineNumber":423,"sourceCode":"\t\t\t\trequest.setDescription(jobProperty.getDescription());\n\t\t\t}\n\t\t\trequest.setTimeType(timeType);\n\t\t\trequest.setTimeExpression(timeExpression);\n\n\t\t\trequest.setTimeoutEnable(true);\n\t\t\trequest.setTimeoutKillEnable(true);\n\t\t\trequest.setSendChannel(SchedulerxConstants.JOB_ALARM_CHANNEL_DEFAULT);\n\t\t\trequest.setFailEnable(true);\n\t\t\trequest.setTimeout(SchedulerxConstants.JOB_TIMEOUT_DEFAULT);\n\t\t\trequest.setMaxAttempt(SchedulerxConstants.JOB_RETRY_COUNT_DEFAULT);\n\t\t\trequest.setAttemptInterval(SchedulerxConstants.JOB_RETRY_INTERVAL_DEFAULT);\n\n\t\t\tUpdateJobResponse response = client.getAcsResponse(request);\n\t\t\tif (response.getSuccess()) {\n\t\t\t\tlogger.info(\"update schedulerx job successfully, jobId={}, jobName={}\", jobConfigInfo.getJobId(), jobConfigInfo.getName());\n\t\t\t}\n\t\t\telse {\n\t\t\t\tthrow new IOException(\"update schedulerx job failed, jobName=\" + jobConfigInfo.getName() + \", message=\" + response.getMessage());\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Get namespace source.\n\t *\n\t * @return namespace source\n\t */\n\tprivate String getNamespaceSource() {\n\t\tString namespaceSource = properties.getNamespaceSource();\n\t\tif (namespaceSource == null || namespaceSource.isEmpty()) {\n\t\t\treturn SchedulerxConstants.NAMESPACE_SOURCE_SPRINGBOOT;\n\t\t}\n\t\treturn namespaceSource;\n\t}\n}\n","sourceCodeStart":405,"sourceCodeEnd":441,"githubUrl":"https://github.com/alibaba/spring-cloud-alibaba/blob/115d5901102009492e05d5ec18c3f79cad4077d0/spring-cloud-alibaba-starters/spring-cloud-starter-alibaba-schedulerx/src/main/java/com/alibaba/cloud/scheduling/schedulerx/service/JobSyncService.java#L405-L441","documentation":"Thrown by JobSyncService.updateJob when the UpdateJob POP RPC returns success=false. The message contains the job's name and the server response.getMessage() (catalog format: 'update schedulerx job failed, jobName={}, message={}'). Indicates the SchedulerX2 backend rejected the update, e.g. job locked, fields immutable, or stale job id.","triggerScenarios":"In updateJob, after building UpdateJobRequest from jobConfigInfo + jobProperty, client.getAcsResponse(request) returns response.getSuccess()==false at JobSyncService.java:421-423. Reached when task-overwrite=true and an existing job's update is server-side rejected.","commonSituations":"The job is currently running/dispatched and cannot be mutated; the job was deleted out-of-band so its jobId is stale; attempting to change an immutable field (e.g. job type) via update; insufficient permission for schedulerx2:UpdateJob.","solutions":["Read the 'message=' segment of the IOException for the precise server reason.","If the job was deleted externally, remove the stale local definition or let createJob recreate it (set overwrite=false once).","Pause/stop the job in the SchedulerX2 console before pushing an incompatible update.","Confirm the runtime credentials include the UpdateJob action."],"exampleFix":"// before: single update call that can fail the whole sync\n// after: isolate update failures and continue\ntry {\n    jobSyncService.updateJob(client, jobConfigInfo, jobProperty, ns);\n} catch (IOException e) {\n    log.warn(\"Update rejected for job '{}' ({}); will retry next sync\", jobConfigInfo.getName(), e.getMessage());\n}","handlingStrategy":"try-catch","validationCode":"// Pre-check: call GetJobInfo to confirm the job still exists and is not in a RUNNING state before attempting update.","typeGuard":null,"tryCatchPattern":"try {\n    // updateJob path\n} catch (IOException e) {\n    // e.getMessage() -> \"update schedulerx job failed, jobName=<n>, message=<server reason>\"\n    log.error(\"Job update failed: {}\", e.getMessage());\n}","preventionTips":["Stop a job in the SchedulerX2 console before pushing structural changes (job type, execute mode).","Idempotency: tolerate 'not found' on update by falling back to create.","Schedule job-sync windows outside peak run times to avoid lock conflicts."],"tags":["java","spring-cloud-alibaba","schedulerx","api","server-side"],"backgroundTag":null,"analyzedSha":"115d5901102009492e05d5ec18c3f79cad4077d0","analyzedAt":"2026-08-14T04:47:13.900Z","schemaVersion":2},"datasetVersion":"2026-08-14T05:17:29.042Z"}