Spring Scheduled Tasks: Fixed Rate and Cron -
Spring Scheduled Tasks: Fixed Rate and Cron - i implementing scheduled tasks using spring. have fixed rate task runs every 30 minutes. configure run every 30 min during 9 - 5, mon - fri. please suggest me way this. simple. fixed rate: import org.springframework.scheduling.annotation.scheduled; import static org.apache.commons.lang.time.dateutils.millis_per_minute; @scheduled(fixedrate = 30 * millis_per_minute) cron look (not tested, please prepare if incorrect): @scheduled(cron = "* 0,30 9-17 * * mon-fri") see also: 25.5.1 @scheduled annotation spring spring-mvc scheduled-tasks