@enesify requested an enhancement on Spring Boot, where actuator endpoints could provide more information about scheduled tasks.
Currently, the /actuator/scheduledtasks
actuator endpoint provides information about scheduled tasks, including their type, target and scheduling information.
The enhancement request would require more metadata being present on the tasks themselves, such as:
- last Execution Time
- last Execution Status
- next Execution Time
The issue also requests the ability to change a cron expression or to manually trigger a task. For that, Spring Boot would need a unique identifier for each task, which they don't have at the moment.
See spring-projects/spring-boot#17585 for context.
Comment From: snicoll
The issue also requests the ability to change a cron expression or to manually trigger a task. For that, Spring Boot would need a unique identifier for each task, which they don't have at the moment.
We'd rather expose the metadata only for now as a first step.
Comment From: alienisty
Note that this feature breaks custom TaskSchedulers injected in the ScheduledTaskRegistrar, were those scheduler relyies on contracts attached to the scheduled Runnable instance. Wrapping it in a OutcomeTrackingRunnable hides whatever contract they bring with them. In our case, for example, the runnable would implement other interfaces to provide locking information for allowing exclusive execution of schedules in a clustered environment, so that only one node would execute at the time. With this change, our clustered TaskScheduler cannot see that interface and the schedules will run in parallel on all nodes.
Created issue https://github.com/spring-projects/spring-framework/issues/35320 for it.