{"record":{"id":"2b14d30f34778ba9","repo":"flowable/flowable-engine","slug":"invalid-reschedule-timer-action-reschedule-timer-2b14d3","errorCode":null,"errorMessage":"Invalid reschedule timer action. Reschedule timer actions must have a valid due date.","messagePattern":"Invalid reschedule timer action\\. Reschedule timer actions must have a valid due date\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/JobResource.java","lineNumber":298,"sourceCode":"    @PostMapping(\"/management/timer-jobs/{jobId}\")\n    @ResponseStatus(HttpStatus.NO_CONTENT)\n    public void executeTimerJobAction(@ApiParam(name = \"jobId\") @PathVariable String jobId, @RequestBody TimerJobActionRequest actionRequest) {\n        if (actionRequest == null || !(MOVE_ACTION.equals(actionRequest.getAction()) || RESCHEDULE_ACTION.equals(actionRequest.getAction()))) {\n            throw new FlowableIllegalArgumentException(\"Invalid action, only 'move' or 'reschedule' are supported.\");\n        }\n        \n        Job job = getTimerJobById(jobId);\n\n        if (MOVE_ACTION.equals(actionRequest.getAction())) {\n            try {\n                managementService.moveTimerToExecutableJob(job.getId());\n            } catch (FlowableObjectNotFoundException e) {\n                // Re-throw to have consistent error-messaging across REST-api\n                throw new FlowableObjectNotFoundException(\"Could not find a timer job with id '\" + jobId + \"'.\", Job.class);\n            }\n        } else if (RESCHEDULE_ACTION.equals(actionRequest.getAction())) {\n            if (actionRequest.getDueDate() == null) {\n                throw new FlowableIllegalArgumentException(\"Invalid reschedule timer action. Reschedule timer actions must have a valid due date.\");\n            }\n            try {\n                managementService.rescheduleTimeDateJob(job.getId(), actionRequest.getDueDate());\n            } catch (FlowableObjectNotFoundException e) {\n                // Re-throw to have consistent error-messaging across REST-api\n                throw new FlowableObjectNotFoundException(\"Could not find a timer job with id '\" + jobId + \"'.\", Job.class);\n            }\n        }\n    }\n    \n    @ApiOperation(value = \"Move a single deadletter job. Accepts 'move' and 'moveToHistoryJob' as action.\", tags = { \"Jobs\" }, code = 204)\n    @ApiResponses(value = {\n            @ApiResponse(code = 204, message = \"Indicates the dead letter job was moved. Response-body is intentionally empty.\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested job was not found.\"),\n            @ApiResponse(code = 500, message = \"Indicates the an exception occurred while executing the job. The status-description contains additional detail about the error. The full error-stacktrace can be fetched later on if needed.\")\n    })\n    @PostMapping(\"/management/deadletter-jobs/{jobId}\")\n    @ResponseStatus(HttpStatus.NO_CONTENT)","sourceCodeStart":280,"sourceCodeEnd":316,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/management/JobResource.java#L280-L316","documentation":"FlowableIllegalArgumentException thrown when action='reschedule' is sent to POST /management/timer-jobs/{jobId} but the request body has no 'dueDate' field. Rescheduling requires an explicit new due date, which is validated before the job is rescheduled via managementService.rescheduleTimeDateJob.","triggerScenarios":"POST /management/timer-jobs/{jobId} with {\"action\":\"reschedule\"} and either no dueDate key, dueDate: null, or an empty string that maps to null.","commonSituations":"Clients that copy the 'move' action payload and only change the action field, forms that leave the date picker empty, DTO serialization dropping null fields client-side, misunderstanding that reschedule requires dueDate while move does not.","solutions":["Add a valid dueDate to the request body: {\"action\":\"reschedule\",\"dueDate\":\"2026-09-12T10:00:00Z\"}","Send an ISO-8601 date string the server can parse into a Date","If no new date is intended, use action 'move' instead to push the timer job to the executable table immediately","Validate client-side that dueDate is non-null and parseable before calling the endpoint"],"exampleFix":"// before\n{\"action\":\"reschedule\"}\n// after\n{\"action\":\"reschedule\",\"dueDate\":\"2026-09-12T10:00:00+02:00\"}","handlingStrategy":"validation","validationCode":"if (action === 'reschedule' && (!dueDate || isNaN(Date.parse(dueDate)))) throw new Error('valid dueDate required for reschedule');","typeGuard":"function hasDueDate(b) { return typeof b?.dueDate === 'string' && !isNaN(Date.parse(b.dueDate)); }","tryCatchPattern":null,"preventionTips":["Always pair action='reschedule' with an ISO-8601 dueDate","Client-side validate the date parses before calling","Use 'move' when you want immediate execution instead of a date"],"tags":["rest-api","validation","flowable","missing-field"],"backgroundTag":"missing-required-argument","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"}