package com.huimv.produce.task; import com.huimv.produce.produce.service.IWeight; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.scheduling.annotation.Scheduled; import org.springframework.stereotype.Component; import java.text.ParseException; /** * @Project : huimv.shiwan * @Package : com.huimv.biosafety.uface.controller * @Description : TODO * @Version : 1.0 * @Author : ZhuoNing * @Create : 2020-12-25 **/ @Component public class MyScheduledTask { @Autowired private IWeight iWeight; // @Scheduled(cron = "0 0/10 * * * ?") // @Scheduled(cron = "0/10 * * * * ?") public void scheduledTask1() throws ParseException { iWeight.autoGenerateDayWeight(); } }