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

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -