Commit f4e1a1a7c60b7785869015b083d678c0f214b651
1 parent
6f45bba3
1.启动时执行一次更新操作
Showing
1 changed file
with
1 additions
and
0 deletions
src/main/java/com/bsth/StartCommand.java
| ... | ... | @@ -43,6 +43,7 @@ public class StartCommand implements CommandLineRunner{ |
| 43 | 43 | |
| 44 | 44 | try { |
| 45 | 45 | log.info("在:"+timeDiff / 1000 / 60 + "分钟后开始同步数据"); |
| 46 | + personnelUpdateThrad.run(); | |
| 46 | 47 | mainServices.scheduleAtFixedRate(personnelUpdateThrad, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS);//timeDiff / 1000 |
| 47 | 48 | // mainServices.scheduleAtFixedRate(personnelUpdateThrad, 1, 60*60, TimeUnit.SECONDS);//timeDiff / 1000 |
| 48 | 49 | } catch (Exception e) { | ... | ... |