ArrayList<ProcessCheckTask> processCheckTaskList = (ArrayList<ProcessCheckTask>) context
.getBean("processCheckTaskList");
// Schedule the process check tasks
for (ProcessCheckTask task : processCheckTaskList) {
ScheduledFuture<?> future = scheduler.schedule(task, new CronTrigger(task.getCron()));
task.setScheduledFuture(future);
}
while (!Thread.interrupted()) {
try {