*/
public void modifyJob(String jobId, String jobGroup, Date startTime)
throws SchedulerException {
log.debug("Modifying job [" + jobId + "][" + jobGroup + "]");
JobDetail jobDetail = getScheduler().getJobDetail(jobId, jobGroup);
if (jobDetail == null) {
throw new SchedulerException("Job not found!");
}
Trigger trigger = getTrigger(jobDetail.getName(), jobGroup);
if (trigger == null) {
log.debug(" No trigger found.");
} else {
log.debug(" Trigger found. Setting new start time.");
jobDetail.setDurability(true);
if (startTime.after(new GregorianCalendar().getTime())) {
log.debug(" Start time is in future - re-scheduling job.");
getScheduler().unscheduleJob(trigger.getName(), trigger.getGroup());
trigger = TriggerHelper.createSimpleTrigger(jobId, jobGroup, startTime);
getScheduler().scheduleJob(trigger);