定时记录在线人数

beetlsql3-dev
Mlxa0324 2 years ago
parent 49cf14f6bd
commit 9eb97c135b

@ -23,7 +23,7 @@ import static com.ibeetl.admin.core.service.CorePlatformService.TOKEN_KEY;
* 线
*
* 15
* 0 0/15 * * * ?
* 0 15,30,45,00 * * * ?
* 00:15 00:30 00:45 00:00
* @author lx
*/
@ -56,6 +56,11 @@ public class OnLineRecordJob implements Job {
paras.setRequestUrl("在线人数统计");
List<SysLog> sysLogList = sysLogService.getValues(paras);
// 如果查询到记录,就不需要重复添加
if (CollUtil.isNotEmpty(sysLogList)) {
return;
}
SysLog model = new SysLog();
// 这里固定该接口的请求路径

@ -160,8 +160,8 @@ public class ApplicationRunnerController implements ApplicationRunner {
quartz.setJobGroup("定时任务在线人数统计脚本");
quartz.setJobClassName("com.ibeetl.jlw.job.OnLineRecordJob");
quartz.setDescription("计划任务启动OnLineRecordJob");
// 每过15分钟 执行一次任务
quartz.setCronExpression("0 0/15 * * * ?");
// 每过15分钟 执行一次任务 00:15 00:30 00:45 00:00
quartz.setCronExpression("0 15,30,45,00 * * * ?");
quartzService.save(quartz, null);
}

Loading…
Cancel
Save