agave-common/common-api/src/main/java/org/iplantc/service/common/quartz/util/QuartzUtility.java
/**
     * changes quartz logging priority/level for class name with the name {@code target}.
     *
     * @param jobName       job name.
     * @param oldExpression new chron expression.
     * @param newExpression new chron expression.
     * @return json message with updated cron expression
     */
changes quartz logging priority/level for class name with the name  target.
@param jobName       job name.
@param oldExpression new chron expression.
@param newExpression new chron expression.
@return json message with updated cron expression
changes quartz logging priority / level for class name with the name target . @param jobName job name . @param oldExpression new chron expression . @param newExpression new chron expression . @return json message with updated cron expression
private synchronized QuartzConfigResetResponse changeJobCronExpression(String jobName, String triggerKey, String newExpression, String oldExpression) {
        log.debug(format("job %s with cron %s will change to %s", jobName, newExpression, oldExpression));
        if (!triggerOriginalSetting.containsKey(triggerKey)) {
            triggerOriginalSetting.put(triggerKey, new OriginalCronSetting(jobName, triggerKey, newExpression, oldExpression));
        }
        JobDetail jobDetail = quartzFindJob(jobName);
        Trigger newTrigger = newTrigger()
                .withIdentity(triggerKey)
                .forJob(jobDetail)
                .withSchedule(CronScheduleBuilder.cronSchedule(newExpression))
                .build();
        try {
            scheduler().rescheduleJob(
                    new TriggerKey(
                            triggerKey,
                            ((JobDetailImpl) jobDetail).getGroup()
                    ),
                    newTrigger
            );
        } catch (SchedulerException e) {
            log.error("failed to reschedule job : " + e.getMessage(), e);
            return new QuartzConfigResetResponse(e.getMessage(), QuartzConfigResetResponse.Type.ERROR);
        }
        return new QuartzConfigResetResponse(triggerKey + " rescheduled to " + newExpression, QuartzConfigResetResponse.Type.SUCCESS);
    }
private synchronized QuartzConfigResetResponse changeJobCronExpression ( String jobName , String triggerKey , String newExpression , String oldExpression ) { log . debug ( format ( "job %s with cron %s will change to %s" , jobName , newExpression , oldExpression ) ) ; if ( ! triggerOriginalSetting . containsKey ( triggerKey ) ) { triggerOriginalSetting . put ( triggerKey , new OriginalCronSetting ( jobName , triggerKey , newExpression , oldExpression ) ) ; } JobDetail jobDetail = quartzFindJob ( jobName ) ; Trigger newTrigger = newTrigger ( ) . withIdentity ( triggerKey ) . forJob ( jobDetail ) . withSchedule ( CronScheduleBuilder . cronSchedule ( newExpression ) ) . build ( ) ; try { scheduler ( ) . rescheduleJob ( new TriggerKey ( triggerKey , ( ( JobDetailImpl ) jobDetail ) . getGroup ( ) ) , newTrigger ) ; } catch ( SchedulerException e ) { log . error ( "failed to reschedule job : " + e . getMessage ( ) , e ) ; return new QuartzConfigResetResponse ( e . getMessage ( ) , QuartzConfigResetResponse . Type . ERROR ) ; } return new QuartzConfigResetResponse ( triggerKey + " rescheduled to " + newExpression , QuartzConfigResetResponse . Type . SUCCESS ) ; }
changes quartz logging priority/level for class name with the name {@code target}.
changes quartz logging priority / level for class name with the name { @code target } .