@Scheduled(fixedRateString = "${github.job.fixed.delay.seconds:60}000")
public void runGithubJob() {
SimpleDateFormat format = new SimpleDateFormat("M-dd-yy hh:mm:ss");
String startDateTime = format.format(new Date());
JobParameters jobParameters =
new JobParametersBuilder()
.addLong("time", System.currentTimeMillis()).toJobParameters();
try {
logger.info("");
logger.info("STARTING GITHUB BATCH JOB : " + startDateTime);
JobExecution execution = jobLauncher.run(githubJob, jobParameters);
logger.info("JOB STATUS : " + execution.getStatus());
} catch (Exception e) {
e.printStackTrace();
logger.info("JOB FAILED!!!");
}
}
GithubJobRunner.java 文件源码
java
阅读 22
收藏 0
点赞 0
评论 0
项目:nixmash-blog
作者:
评论列表
文章目录