package com.steering.jobface.qcm;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import java.util.Timer;
import java.util.TimerTask;

public class SampleHeatTreatmentToQcmServlet extends HttpServlet {
    public void init() throws ServletException {
        try {

            new Timer().scheduleAtFixedRate(new TimerTask() {
                                                @Override
                                                public void run() {
                                                    synchronized (this) {

                                                        new SampleHeatTreatmentToQcm().InsertData();

                                                    }
                                                }
                                            }, 0,
                    10 * 1000);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }
}