final ClassMethodNamesPair jobDetails = CronMethodParser.findTargetMethodDetails(scheduledJobDetail.getJobName());
if (jobDetails == null) { throw new IllegalArgumentException(
"Code has no @CronTarget with this job name (@see JobName); seems like DB/code are not in line: "
+ scheduledJobDetail.getJobName()); }
final Object targetObject = getBeanObject(Class.forName(jobDetails.className));
final MethodInvokingJobDetailFactoryBean jobDetailFactoryBean = new MethodInvokingJobDetailFactoryBean();
jobDetailFactoryBean.setName(scheduledJobDetail.getJobName() + "JobDetail" + tenant.getId());
jobDetailFactoryBean.setTargetObject(targetObject);
jobDetailFactoryBean.setTargetMethod(jobDetails.methodName);
jobDetailFactoryBean.setGroup(scheduledJobDetail.getGroupName());
jobDetailFactoryBean.setConcurrent(false);
jobDetailFactoryBean.afterPropertiesSet();
return jobDetailFactoryBean.getObject();
}