package com.steering.jobface.qcm;

import java.util.Timer;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.text.ParseException;

public class CoreMscServlet extends HttpServlet {
    private static final long serialVersionUID = 1454993484711061690L;

    public void init() throws ServletException {
        try {
            SimpleDateFormat fTime = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
            SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
            String strDay = df.format(new Date());
            Date strDate = fTime.parse(strDay+" 23:59:00");
            System.out.println("--------------后台线程初始化中--------------------");
            // 刷新MSC内控标志位
            /*new Timer().scheduleAtFixedRate(new CoreMscTask(), strDate,
                    24*60*60*1000);*/
            System.out.println("--------------后台线程初始化成功--------------------");
        }
        catch (ParseException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }    
}