# application.yml
# 定时任务
scheduledTask:
# 收集主机信息-任务
collectMessage:
# 十秒
#cron: "0/10 * * * * ?"
#cron: "0/1 1/1 2/2 * * ?"
# 不使用定时器
cron: "-"
@Scheduled(cron = "${scheduledTask.collectMessage.cron}")
有版本限制,一定要注意噢

# application.yml
# 定时任务
scheduledTask:
# 收集主机信息-任务
collectMessage:
# 十秒
#cron: "0/10 * * * * ?"
#cron: "0/1 1/1 2/2 * * ?"
# 不使用定时器
cron: "-"
@Scheduled(cron = "${scheduledTask.collectMessage.cron}")
有版本限制,一定要注意噢