Results 1 to 2 of 2

Thread: How persist new job

  1. #1
    Join Date
    Jul 2009
    Posts
    4

    Default How persist new job

    Hello, I have a problem with the configuration at run-time for a new job, I run the following code and the job is started correctly, but is not persisted to the database on the table BATCH_JOB_EXECUTION, how can I persist my new job? thanks for the help
    Code:
    JobDetail jd = new JobDetail("MyJob", "quartz-batch", BatchServiceImp.class);
    CronTrigger ct = new CronTrigger("triggerName", "quartz-batch", "0 07 12 ? * *");
    SchedulerFactory sf = new StdSchedulerFactory();
    Scheduler sched = sf.getScheduler();
    sched.scheduleJob(jd, ct);
    sched.start();

  2. #2
    Join Date
    Jun 2005
    Posts
    4,231

    Default

    What does BatchServiceImp do? If it runs a Spring batch job and the job has a JDBC repository, then the JobExecution will be persisted in that table. The sample code is only showing Quartz usage (not even Spring), so it's not very clear what you expect.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •