title: Check whether the job is running or not?
body: <p>I want to check whether Quartz job is running or not.I found that it can be used using <a href="https://stackoverflow.com/questions/24282441/how-to-check-whether-quartz-cron-job-is-running">scheduler.getCurrentlyExecutingJobs()</a>. BuI'm confused with that and where exactly should I put it to get the results?
  Thanks</p>
  
  <pre><code>try {
  
          // specify the job' s details..
          JobDetail job = JobBuilder.newJob(TestJob.class)
              .withIdentity("testJob")
              .build();
  
          // specify the running period of the job
          Trigger trigger = TriggerBuilder.newTrigger()
                .withSchedule(  
                      SimpleScheduleBuilder.simpleSchedule()
                      .withIntervalInSeconds(10)
                      .repeatForever())  
                           .build();  
  
          //schedule the job
          SchedulerFactory schFactory = new StdSchedulerFactory();
          Scheduler sch = schFactory.getScheduler();
          sch.start();            
          sch.scheduleJob(job, trigger);
  
          System.out.println("******* " + sch.getCurrentlyExecutingJobs());
  
      } catch (SchedulerException e) {
          e.printStackTrace();
      }
  </code></pre>