Skip to content

Spring boot 3.2.2 @Scheduled with cron expression executing immediately after application startup. #32309

Closed as not planned
@Kryptonian-C

Description

@Kryptonian-C

I have an application currently running on Springboot 3.1.2. The app having @scheduled method with cron expression.

As soon as I update the spring-boot version to 3.2.2 the first execution happens immediately after the application startup.

If I switch back to 3.1.2 this doesn't happen and the scheduled job executes only at the time defined in CRON.

Is there something that we have to take care during the upgrade.

##Method :

@scheduled(cron = "${cron.expression.maximize-value}", zone = "${cron.timezone}")
public Flux maximizeValue() {...}

The class is annotated with @service.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: invalidAn issue that we don't feel is valid

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions