java - Can I newJob on a class and also set some values? -
the usage of newjob following:
newjob(connectorscheduler.class)
but want set spring jdbctemplate on instance of connectorscheduler, doable?
basically want do
job=new connectorscheduler(); job.setjdbctemplate(jdbctemplate); newjob(job);
yes, can pass parameters jobs (and triggers), in quartz must use jobdatamap structure works so:
job=new connectorscheduler(); job.getjobdatamap().put("param1", "123"); newjob(job);
for numerical (and other non-string values) can use:
job.getjobdatamap().putasstring("param1", 123);
Comments
Post a Comment