{"record":{"id":"14f5db177535c7a7","repo":"quarkusio/quarkus","slug":"invalid-scheduled-method-method-fixeddelay","errorCode":null,"errorMessage":"Invalid @Scheduled method '<method>': 'fixedDelay' not supported","messagePattern":"Invalid @Scheduled method '<method>': 'fixedDelay' not supported","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"extensions/spring-scheduled/deployment/src/main/java/io/quarkus/spring/scheduled/deployment/SpringScheduledProcessor.java","lineNumber":102,"sourceCode":"    void processSpringScheduledAnnotation(BuildProducer<ScheduledBusinessMethodItem> scheduledBusinessMethods,\n            BeanInfo bean, MethodInfo method, List<AnnotationInstance> scheduledAnnotations) {\n        List<AnnotationInstance> schedules = new ArrayList<>();\n        if (scheduledAnnotations != null) {\n            for (AnnotationInstance scheduledAnnotation : scheduledAnnotations) {\n                List<AnnotationValue> springAnnotationValues = scheduledAnnotation.values();\n                List<AnnotationValue> confValues = new ArrayList<>();\n                if (!springAnnotationValues.isEmpty()) {\n                    if (annotationsValuesContain(springAnnotationValues, \"fixedRate\")\n                            || annotationsValuesContain(springAnnotationValues, \"fixedRateString\")) {\n                        confValues.add(buildEveryParam(springAnnotationValues));\n                        if (annotationsValuesContain(springAnnotationValues, \"initialDelay\")\n                                || annotationsValuesContain(springAnnotationValues, \"initialDelayString\")) {\n                            confValues.addAll(buildDelayParams(springAnnotationValues));\n                        }\n\n                    } else if (annotationsValuesContain(springAnnotationValues, \"fixedDelay\")\n                            || annotationsValuesContain(springAnnotationValues, \"fixedDelayString\")) {\n                        throw new IllegalArgumentException(\n                                \"Invalid @Scheduled method '\" + method.name()\n                                        + \"': 'fixedDelay' not supported\");\n                    } else if (annotationsValuesContain(springAnnotationValues, \"cron\")) {\n                        if (annotationsValuesContain(springAnnotationValues, \"initialDelay\")) {\n                            throw new IllegalArgumentException(\n                                    \"Invalid @Scheduled method '\" + method.name()\n                                            + \"': 'initialDelay' not supported for cron triggers\");\n                        }\n                        confValues.add(buildCronParam(springAnnotationValues));\n                    }\n\n                }\n                AnnotationInstance regularAnnotationInstance = AnnotationInstance.create(QUARKUS_SCHEDULED,\n                        scheduledAnnotation.target(), confValues);\n                schedules.add(regularAnnotationInstance);\n            }\n            if (schedules != null) {\n                scheduledBusinessMethods.produce(new ScheduledBusinessMethodItem(bean, method, schedules));","sourceCodeStart":84,"sourceCodeEnd":120,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/extensions/spring-scheduled/deployment/src/main/java/io/quarkus/spring/scheduled/deployment/SpringScheduledProcessor.java#L84-L120","documentation":"Quarkus's Spring scheduled extension translates Spring's @Scheduled to Quarkus scheduling, but fixedDelay semantics (delay between end of previous execution and start of the next) are not supported by the translation. Any @Scheduled method using fixedDelay or fixedDelayString is rejected at build time.","triggerScenarios":"Annotating a bean method with @Scheduled(fixedDelay = 5000) or @Scheduled(fixedDelayString = \"5000\") in a Quarkus application using the spring-scheduled extension.","commonSituations":"Migrating Spring Boot scheduled jobs to Quarkus without converting fixedDelay to fixedRate; copying Spring scheduling examples verbatim.","solutions":["Replace fixedDelay with fixedRate if fixed-pace periodic execution is acceptable","Use a cron expression to achieve delay-like behavior","Drop the spring-scheduled extension and use Quarkus native @Scheduled with its period/delay attributes","Implement the delay logic inside the scheduled method or a dedicated executor"],"exampleFix":"// before\n@Scheduled(fixedDelay = 5000)\nvoid poll() {}\n\n// after\n@Scheduled(fixedRate = 5000)\nvoid poll() {}","handlingStrategy":"validation","validationCode":"Scheduled s = method.getAnnotation(Scheduled.class);\nif (s != null && (s.fixedDelay() > 0 || !s.fixedDelayString().isEmpty())) {\n    throw new IllegalStateException(\"fixedDelay unsupported: use fixedRate or cron on \" + method.getName());\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Convert fixedDelay to fixedRate or cron when migrating to Quarkus","Grep for fixedDelay in @Scheduled annotations before building","Use Quarkus native @Scheduled for new code"],"tags":["spring-scheduled","fixeddelay","build-time","quarkus"],"backgroundTag":"fixeddelay-unsupported","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-12T22:17:10.623Z"}