简体   繁体   中英

Spring @Scheduled cron job

I am looking to fire off a task everyday at 9am. I am getting some funky results. Currently my job looks like this:

@Scheduled(cron = "0 0 9 * * ?")

What is going wrong with this? Is this the correct expression?

I believe @Scheduled(cron="0 0 9 * * *") should work. Also make sure that you are on right time zone. Have a look at this video to know different possible ways to use cron expression with @Scheduled.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM