@Test public void assertRescheduleJobSuccessForOneOffJob() throws SchedulerException { when(scheduler.getTrigger(TriggerKey.triggerKey("test_job_Trigger"))).thenReturn(new SimpleTriggerImpl()); ReflectionUtils.setFieldValue(jobScheduleController, "scheduler", scheduler); jobScheduleController.rescheduleJob(); verify(scheduler).rescheduleJob(eq(TriggerKey.triggerKey("test_job_Trigger")), any()); }
public synchronized void rescheduleJob(final String cron) { try { CronTrigger trigger = (CronTrigger) scheduler.getTrigger(TriggerKey.triggerKey(triggerIdentity)); if (!scheduler.isShutdown() && null != trigger && !cron.equals(trigger.getCronExpression())) { scheduler.rescheduleJob(TriggerKey.triggerKey(triggerIdentity), createCronTrigger(cron)); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } }
JobScheduleController { public synchronized void rescheduleJob(final String cron) { try { CronTrigger trigger = (CronTrigger) scheduler.getTrigger(TriggerKey.triggerKey(triggerIdentity)); if (!scheduler.isShutdown() && null != trigger && !cron.equals(trigger.getCronExpression())) { scheduler.rescheduleJob(TriggerKey.triggerKey(triggerIdentity), createCronTrigger(cron)); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } } }
JobScheduleController { public synchronized void rescheduleJob(final String cron) { try { CronTrigger trigger = (CronTrigger) scheduler.getTrigger(TriggerKey.triggerKey(triggerIdentity)); if (!scheduler.isShutdown() && null != trigger && !cron.equals(trigger.getCronExpression())) { scheduler.rescheduleJob(TriggerKey.triggerKey(triggerIdentity), createCronTrigger(cron)); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } }  }
JobScheduleController { public synchronized void rescheduleJob(final String cron) { try { CronTrigger trigger = (CronTrigger) scheduler.getTrigger(TriggerKey.triggerKey(triggerIdentity)); if (!scheduler.isShutdown() && null != trigger && !cron.equals(trigger.getCronExpression())) { scheduler.rescheduleJob(TriggerKey.triggerKey(triggerIdentity), createCronTrigger(cron)); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } }  void scheduleJob(final String cron); synchronized void rescheduleJob(final String cron); synchronized void rescheduleJob(); synchronized boolean isPaused(); synchronized void pauseJob(); synchronized void resumeJob(); synchronized void triggerJob(); synchronized void shutdown(); synchronized void shutdown(final boolean isCleanShutdown); }
JobScheduleController { public synchronized void rescheduleJob(final String cron) { try { CronTrigger trigger = (CronTrigger) scheduler.getTrigger(TriggerKey.triggerKey(triggerIdentity)); if (!scheduler.isShutdown() && null != trigger && !cron.equals(trigger.getCronExpression())) { scheduler.rescheduleJob(TriggerKey.triggerKey(triggerIdentity), createCronTrigger(cron)); } } catch (final SchedulerException ex) { throw new JobSystemException(ex); } }  void scheduleJob(final String cron); synchronized void rescheduleJob(final String cron); synchronized void rescheduleJob(); synchronized boolean isPaused(); synchronized void pauseJob(); synchronized void resumeJob(); synchronized void triggerJob(); synchronized void shutdown(); synchronized void shutdown(final boolean isCleanShutdown);  }