Job Scheduling in Java
Subject:   A question need to be reply,thanks
Date:   2005-01-04 03:11:11
From:   banny
during the runtime ,when we change the job data stored in database,what will happen?Dose the scheduler use the new data to schedule?
It seems that,the scheduler don't allow us to change the data during the runtime, the data was recovered the original.
Who can give me the answer?Thanks a lot!
Full Threads Oldest First

Showing messages 1 through 3 of 3.

  • A question need to be reply,thanks
    2005-10-21 00:38:01  psivakumar [View]

    i think it is possible.. i have gone through the given example in that job is rescheduled after the scheduler is started.
    here is the snippet from the exapmle before starting the scheduler the job7 is repeated for 20 times like
    // All of the jobs have been added to the scheduler, but none of the jobs
    // will run until the scheduler has been started
    sched.start();"------- Started Scheduler -----------------");

    // jobs can also be scheduled after start() has been called...
    // job7 will repeat 20 times, repeat every five minutes
    job = new JobDetail("job7", "group1", SimpleJob.class);
    trigger = new SimpleTrigger("trigger7", "group1", "job7", "group1",
    new Date(ts), null, 20, 300000L);
    ft = sched.scheduleJob(job, trigger);

    // jobs can be re-scheduled...
    // job 7 will run immediately and repeat 10 times for every second"------- Rescheduling... --------------------");
    trigger = new SimpleTrigger("trigger7", "group1", "job7", "group1",
    new Date(), null, 10, 1000L);
    ft = sched.rescheduleJob("trigger7", "group1", trigger);

    i had run this it is taking the latest one. iam also new to this.. if iam wrong please correct me.
    • A question need to be reply,thanks
      2007-05-10 21:11:42  VishalThakur [View]

      Hi all,
      you are close but its not going to work..job always looses its reference once executed.So to make more than one trigger point to a single job need to set jobDetail "setDurability" property as true.
    • A question need to be reply,thanks
      2007-02-01 21:52:10  bhumireddy [View]

      This code is not executing the job after reschedule.
      But it still returns the date ft.