Women in Technology

Hear us Roar



Article:
  Job Scheduling in Java
Subject:   A question need to be reply,thanks
Date:   2005-01-04 03:11:11
From:   banny
JobStoreTX:
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!
Main Topics Oldest First

Showing messages 1 through 1 of 1.

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

    Hi
    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();

    log.info("------- 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
    log.info("------- 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.