title: Java pass Object to Quartzjob ( Quartz 2 )
body: <p>I use Quartz 2 to create a Interval in Java.</p>
  
  <p>Now i want to pass the <strong>Object obj1</strong> from the <em>Updater</em> to the <em>UpdateJob</em>.
  How can i make this ? </p>
  
  <p>Interval.java/Updater :</p>
  
  <pre><code>public class Interval {
  
      public static void Updater( Object obj1 ) throws SchedulerException {
          JobDetail job = newJob(UpdateJob.class).withIdentity("UpdateJob", "Group1").build();
          Trigger trigger = newTrigger().withIdentity("UpdateTrigger", "Group1")
                  .withSchedule(SimpleScheduleBuilder.simpleSchedule().withIntervalInSeconds(5).repeatForever()).build();
          Scheduler sched = new StdSchedulerFactory().getScheduler();
          sched.scheduleJob(job, trigger);
          sched.start();
      }
  
  }
  </code></pre>
  
  <p>UpdateJob.java : </p>
  
  <pre><code>    public class UpdateJob implements Job {
  
            public void execute(JobExecutionContext context)
                              throws JobExecutionException {
  
                    //obj1 jobs
  
            }
  
      }
  </code></pre>