package com.bonus.tcp.task.config;

import com.bonus.tcp.task.service.ScheduleService;
import lombok.extern.slf4j.Slf4j;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 初始化文件扫描配置
 */
@Slf4j
public class ConfigScanJob  implements Job {


    @Autowired
    private ScheduleService scheduleService;

    @Override
    public void execute(JobExecutionContext arg0) throws JobExecutionException {
        try {
          //  log.error("开始努力扫描定时任务配置....");
            this.scheduleService.proceedSchedule();
        } catch (Exception e) {
            throw new JobExecutionException(e);
        }

    }

}