Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
当应用程序完成启动时,第一次手动(从代码)开始它,然后使用调度程序每小时使用@计划注释。
@scheduled注释的示例:
@scheduled
注意:我认为@scheduled(fixedrate = 3600000)(其中3600000在毫秒中为60分钟,即每小时)是您要实现的目标。
@scheduled(fixedrate = 3600000)
3600000
Start it manually (from code) first time when the application has finished startup and then use scheduler to run it every hour using @Scheduled annotation.
Examples for @Scheduled annotation:
@Scheduled
Note:I think @Scheduled(fixedRate = 3600000) (where 3600000 is 60 minutes in milliseconds, i.e. each hour) is what you are trying to achieve.
@Scheduled(fixedRate = 3600000)
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
暂无简介
文章 0 评论 0
接受
发布评论
评论(1)
当应用程序完成启动时,第一次手动(从代码)开始它,然后使用调度程序每小时使用@计划注释。
@scheduled
注释的示例:注意:
我认为
@scheduled(fixedrate = 3600000)
(其中3600000
在毫秒中为60分钟,即每小时)是您要实现的目标。Start it manually (from code) first time when the application has finished startup and then use scheduler to run it every hour using @Scheduled annotation.
Examples for
@Scheduled
annotation:Note:
I think
@Scheduled(fixedRate = 3600000)
(where3600000
is 60 minutes in milliseconds, i.e. each hour) is what you are trying to achieve.