 import java.util.ArrayList;
import java.util.Hashtable;
import java.util.Map;

import org.quartz.CronScheduleBuilder;
import org.quartz.CronTrigger;
import org.quartz.JobBuilder;
import org.quartz.JobDetail;
import org.quartz.ScheduleBuilder;
import org.quartz.Scheduler;
import org.quartz.SchedulerException;
import org.quartz.TriggerBuilder;
import org.quartz.impl.StdSchedulerFactory;


 public class AnprStatusInfo{
   public static void main(String[] args) {

     AnprStatusInfo anpr = new AnprStatusInfo();
     anpr.runAnprCarInfo("");
   }

   public AnprStatusInfo() {
     Map<String, Boolean> mapIsRun_1 = new Hashtable<>();
     Map<String, Boolean> mapIsRun_3 = new Hashtable<>();

     mapIsRun_1.put("01", Boolean.valueOf(false));
     mapIsRun_1.put("02", Boolean.valueOf(false));
     mapIsRun_1.put("03", Boolean.valueOf(false));
     mapIsRun_1.put("04", Boolean.valueOf(false));
     mapIsRun_1.put("05", Boolean.valueOf(false));
     mapIsRun_1.put("06", Boolean.valueOf(false));
     mapIsRun_1.put("07", Boolean.valueOf(false));
     mapIsRun_1.put("08", Boolean.valueOf(false));

     mapIsRun_3.put("01", Boolean.valueOf(false));
     mapIsRun_3.put("02", Boolean.valueOf(false));
     mapIsRun_3.put("03", Boolean.valueOf(false));
     mapIsRun_3.put("04", Boolean.valueOf(false));
     mapIsRun_3.put("05", Boolean.valueOf(false));
     mapIsRun_3.put("06", Boolean.valueOf(false));
     mapIsRun_3.put("07", Boolean.valueOf(false));
     mapIsRun_3.put("08", Boolean.valueOf(false));
     mapIsRun_3.put("09", Boolean.valueOf(false));
     mapIsRun_3.put("10", Boolean.valueOf(false));
   }



   public void runAnprCarInfo(String no_use) {
     try {
       ArrayList<String> state = new ArrayList<>();


       JobDetail job = JobBuilder.newJob(AnprStatusJob.class)
         .withIdentity("testJob")
         .usingJobData("jobSays", "ant.xml")
         .usingJobData("myFloatValue", Float.valueOf(3.141F)).build();

       job.getJobDataMap().put("state", state);


       CronTrigger cronTrigger =
         (CronTrigger)TriggerBuilder.newTrigger()
         .withIdentity("crontrigger", "crontriggergroup1")
         .withSchedule(

           (ScheduleBuilder)CronScheduleBuilder.cronSchedule("0 0/1 * * * ?")) //1분마다
         .build();


       StdSchedulerFactory stdSchedulerFactory = new StdSchedulerFactory();
       Scheduler sch = stdSchedulerFactory.getScheduler();



       sch.start();
       sch.scheduleJob(job, cronTrigger);

     }
     catch (SchedulerException e) {
       e.printStackTrace();
     }
   }
 }


