result.setFailed(SCHEDULER_IS_NULL);
}else{
// Trigger trigger;
try {
// JobDataMap jobDataMap = new JobDataMap();
CronTriggerImpl t = new CronTriggerImpl();
t.setKey(TriggerKey.triggerKey(name, group));
t.setDescription(description);
t.setCronExpression(cronExp);
t.setJobKey(GetObjectString.string2JobKey(taskinfo.getId()));
/**!
* 设置MISFIRE的策略!!
* 使用默认策略
*/
// t.setMisfireInstruction(CronTrigger.MISFIRE_INSTRUCTION_DO_NOTHING);
// putMapData2JobDataMap(properties,jobDataMap);
// t.setJobDataMap(jobDataMap);
// trigger = newTrigger()
// .withIdentity(name, group)
// .withDescription(description)
// .withSchedule(cronSchedule(cronExp))
// .forJob(GetObjectString.string2JobKey(taskinfo.getId()))
// .build();
SchedulerProvider.scheduler.scheduleJob(t);
result.setData(t.getKey().toString());
result.setSucceed();
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
result.setFailed(e.getMessage());