Authored by skinny.wu

定时任务时间间隔改成cron表达式 测试resource中cron表达式为不执行状态 可修改

... ... @@ -27,7 +27,7 @@ public class NginxCalTask {
@Autowired
public AlarmMsgComp alarmMsgComp;
@Scheduled(fixedRate = 2 * 60 * 1000L)
@Scheduled(cron = "${cron_task_nginx_cal}")
public void call() {
try {
... ...
... ... @@ -29,7 +29,7 @@ public class NginxScanTask {
ITypeInfoService typeService;
//自动发现Nginx监控对象
@Scheduled(fixedRate = 60*1000L)
@Scheduled(cron = "${cron_task_nginx_scan}")
public void doTask() {
List<TypeInfo> typeInfosList = typeService.queryAllTypesInfo();
... ...
... ... @@ -51,7 +51,7 @@ public class RabbitMonitTask {
@Autowired
AlarmMsgComp alarmMsgComp;
@Scheduled(fixedRate = 2 * 60 * 1000L)
@Scheduled(cron = "${cron_task_rabbit_monit}")
public void doTask() {
synchronized (InterVar.LOCK.intern()) {
for (Map.Entry<Integer, MObjectInfo> entry : InterVar.moMaps.entrySet()) {
... ...
... ... @@ -41,7 +41,7 @@ public class RabbitScanTask implements Runnable {
}
//自动发现rabbit监控对象
@Scheduled(fixedRate = 60 * 1000L)
@Scheduled(cron = "${cron_task_rabbit_scan}")
public void doTask() {
List<TypeInfo> typeInfosList = typeService.queryAllTypesInfo();
... ...
... ... @@ -11,9 +11,8 @@ public class RedisMonitorTask {
@Autowired
private IRedisMonitorHandleService redisMonitorService;
//@Scheduled(fixedRate=20000)
@Scheduled(cron="0 0/3 * * * ? ")
@Scheduled(cron="${cron_task_redis_monitor}")
public void redisMonitor(){
redisMonitorService.redisMonitor();
}
... ...
... ... @@ -18,8 +18,7 @@ public class ZookeeperMonitorTask {
@Autowired
IZkMonitorHandleService zkMonitorService;
//@Scheduled(fixedRate=20000)
@Scheduled(cron="0 0/2 * * * ? ")
@Scheduled(cron="${cron_task_zookeeper_monitor}")
public void zookeeperMonitor() {
zkMonitorService.zookeeperMonitor();
}
... ...
cron_task_zookeeper_monitor=0 0/2 * * * ?
cron_task_redis_monitor=0 0/3 * * * ?
cron_task_nginx_scan=0 0/1 * * * ?
cron_task_nginx_cal=0 0/2 * * * ?
cron_task_rabbit_monit=0 0/2 * * * ?
cron_task_rabbit_scan=0 0/1 * * * ?
... ...
#cron_task_zookeeper_monitor=0 0/2 * * * ?
cron_task_zookeeper_monitor=0 0 0 * * ?
#cron_task_redis_monitor=0 0/3 * * * ?
cron_task_redis_monitor=0 0 0 * * ?
#cron_task_nginx_scan=0 0/1 * * * ?
cron_task_nginx_scan=0 0 0 * * ?
#cron_task_nginx_cal=0 0/2 * * * ?
corn_task_nginx_cal=0 0 0 * * ?
#cron_task_rabbit_monit=0 0/2 * * * ?
cron_task_rabbit_monit=0 0 0 * * ?
#cron_task_rabbit_scan=0 0/1 * * * ?
cron_task_rabbit_scan=0 0 0 * * ?
\ No newline at end of file
... ...