Announcement Announcement Module
Collapse
No announcement yet.
How persist new job Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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
    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.

    Comment

    Working...
    X