Commits

Zemian Deng  committed 2a80796

Fixed Issue#24 PollingScheduleRunner throws NPE when delete Schedules

  • Participants
  • Parent commits 245bf8d

Comments (0)

Files changed (1)

File timemachine-scheduler/src/main/java/timemachine/scheduler/service/PollingScheduleRunner.java

 			schedule = scheduleJobDef.getItem1(); // reload it.
 			JobDef jobDef = scheduleJobDef.getItem2();
 			
+			// In case it has already been deleted.
+			if (schedule == null)
+				continue;
+			
 			// Ensure schedule is still good
 			if (schedule.isPaused() || schedule.isDeleted() || schedule.getNextRun() == null) {
 				if (logger.isDebugEnabled())