{"record":{"id":"05ad1938c20147be","repo":"flowable/flowable-engine","slug":"no-timer-job-found-with-id-jobid","errorCode":null,"errorMessage":"No timer job found with id '${jobId}'.","messagePattern":"No timer job found with id '(.+?)'\\.","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/SetTimerJobRetriesCmd.java","lineNumber":65,"sourceCode":"        this.jobId = jobId;\n        this.retries = retries;\n        this.jobServiceConfiguration = jobServiceConfiguration;\n    }\n\n    @Override\n    public Void execute(CommandContext commandContext) {\n        TimerJobEntity job = jobServiceConfiguration.getTimerJobEntityManager().findById(jobId);\n        if (job != null) {\n\n            job.setRetries(retries);\n\n            FlowableEventDispatcher eventDispatcher = jobServiceConfiguration.getEventDispatcher();\n            if (eventDispatcher != null && eventDispatcher.isEnabled()) {\n                eventDispatcher.dispatchEvent(FlowableJobEventBuilder.createEntityEvent(FlowableEngineEventType.ENTITY_UPDATED, job),\n                        jobServiceConfiguration.getEngineName());\n            }\n        } else {\n            throw new FlowableObjectNotFoundException(\"No timer job found with id '\" + jobId + \"'.\", Job.class);\n        }\n        return null;\n    }\n}\n","sourceCodeStart":47,"sourceCodeEnd":70,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-job-service/src/main/java/org/flowable/job/service/impl/cmd/SetTimerJobRetriesCmd.java#L47-L70","documentation":"SetTimerJobRetriesCmd.execute throws this FlowableObjectNotFoundException when no timer job entity exists in the ACT_RU_TIMER_JOB table for the given id (with type Job.class). The command validated the id format but the lookup returned null, so the retries cannot be updated.","triggerScenarios":"Calling setTimerJobRetries with an id belonging to a regular async job, suspended job, dead-letter job, or history-only (deleted runtime) job; passing an id that was already consumed because the timer fired and the job moved/executed; stale id from a completed process.","commonSituations":"Confusing timer job ids with job-entity ids from a different table; the timer fired between listing it and updating it; running against a different database/schema than the one the job was created in; process finished and runtime data cleaned up.","solutions":["Verify the id is a timer job id (query ACT_RU_TIMER_JOB or use TimerJobQuery)","Catch FlowableObjectNotFoundException and treat the job as already executed/removed if that is an acceptable outcome","Check you are connected to the correct datasource/schema and the process is still running","Refresh the job id from a fresh TimerJobQuery before retrying the update"],"exampleFix":"// before\nmanagementService.setTimerJobRetries(timerJobId, 3);\n// after\nTimerJob timerJob = managementService.createTimerJobQuery(). jobId(timerJobId).singleResult();\nif (timerJob != null) {\n    managementService.setTimerJobRetries(timerJobId, 3);\n} else {\n    logger.warn(\"Timer job {} no longer exists; skipping retry update\", timerJobId);\n}","handlingStrategy":"try-catch","validationCode":"TimerJob job = managementService.createTimerJobQuery().jobId(timerJobId).singleResult();\nif (job == null) { /* skip or warn */ }","typeGuard":null,"tryCatchPattern":"try {\n    managementService.setTimerJobRetries(timerJobId, 3);\n} catch (FlowableObjectNotFoundException e) {\n    logger.warn(\"Timer job {} not found; already executed or removed\", timerJobId);\n}","preventionTips":["Confirm the id exists via createTimerJobQuery before updating","Expect timers to disappear once fired; design handlers to tolerate absence","Point at the correct datasource/schema"],"tags":["not-found","flowable","job-lookup"],"backgroundTag":"entity-not-found","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}