How to customize the exception handling for @Scheduled annotation from spring ?
I have Cron jobs which will be triggered in the server (Tomcat 6) and when any except
Why not wrap your business logic and do a simple try catch in your @schedule method. Then you can log or take whatever action is necessary for failure cases.
@Scheduled(cron = "${schedulerRate}")
public void scheduledJob() {
try {
businessLogicService.doBusinessLogic();
} catch (Exception e) {
log.error(e);
}
}