Spring cron expression for every day 1:01:am

后端 未结 6 898
南方客
南方客 2020-11-28 00:08

I\'m trying to have my code execute on a fixed schedule, based on a Spring cron expression. I would like the code to be executed every day at 1:01:am. I tried the following

6条回答
  •  感情败类
    2020-11-28 00:50

    You can use annotate your method with @Scheduled(cron ="0 1 1 * * ?").

    0 - is for seconds

    1- 1 minute

    1 - hour of the day.

提交回复
热议问题