[Java] timed task to stop time setting

My needs: daily 9:00 to 20:00 run

Solution: @Scheduled (cron = "? 0 * 9,10,11,12,13,14,15,16,17,18,19 * *")

Explanation: The comma means or mean. This is Nene 9:00 or 10:00 or daily. . . Run

 

Divergence: a time to stop ===> set to run a certain time ===> operation period

Guess you like

Origin www.cnblogs.com/xiangtunmizu/p/11926807.html