In application or configuration class add annotation @EnableScheduling
Specify cron string with the schedule to be executed
@Scheduled(cron = "${notification.cron:0 0 0/1 * * *}")
public void sendNotifications() {
logger.info("Sending notifications.....");
}