I have two works in Quartz that will work well, but I believe that I need to use code, for example:
jd = new JobDetail(sj.getJobName(), scheduler.DEFAULT_GROUP, PollJob.class);
ct = new CronTrigger(sj.getJobTrigger(), scheduler.DEFAULT_GROUP, "0 20 * * * ?");
scheduler.scheduleJob(jd, ct);
I need to copy the PollJob.class file to run the job, and sj is the object that is read from the database containing the PollJob information. But I would also like to install PollJob.class from the database. I tried casting in class:
Class cls = Class.forName(sj.getJobJavaClassFile());
jd = new JobDetail(sj.getJobName(), scheduler.DEFAULT_GROUP, cls));
And using the class reference directly as:
jd = new JobDetail(sj.getJobName(), scheduler.DEFAULT_GROUP, Class.forName sj.getJobJavaClassFile()));
But the work is simply not being done. There are no exceptions that I see and do not trace the trace?
I am running the JVM on Windows 7.
Any ideas?
Mr. Morgan.
source
share