SchedulerTask.java 544 Bytes
package com.viontech.job;

import java.io.IOException;

import com.viontech.service.impl.WeatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * @author zhaibolin
 */
@Component
public class SchedulerTask {

    @Autowired
    private WeatherService weatherService;

    @Scheduled(cron = "0 30 5 * * ? ")
    private void process() throws IOException {
        weatherService.getWeatherInfo();
    }


}