import org.apache.log4j.Logger;import org.springframework.beans.factory.annotation.Autowired;import com.yundaex.wms.core.alive.job.handler.BatchDelZombiePackBenchNoHandler;public class TimingBatchDelZombiePackBenchNoJob { private static final Logger logger = Logger.getLogger(TimingBatchDelZombiePackBenchNoJob.class); @Autowired private BatchDelZombiePackBenchNoHandler handler; public void doExecute() { try { long startTime = 0L; if (logger.isDebugEnabled()){ startTime = System.currentTimeMillis(); logger.debug("定时清除僵化包装台任务开始。"); } handler.execute(); if (logger.isDebugEnabled()){ long endTime = System.currentTimeMillis(); logger.debug("定时清除僵化包装台任务结束,耗时:" + (endTime - startTime) + "毫秒。"); } } catch (Exception e) { logger.error("定时清除僵化包装台任务异常。", e); } }}
org.quartz-scheduler quartz 1.8.5