@Override public void execute(JobStatusUpdater statusUpdater, JobSuite suite) { double commandCount = systemCommands.length; double commandsRan = statusUpdater.getProperties().getDouble("ran", 0d); for (int i = (int) commandsRan; i < commandCount; i++) { SystemCommand systemCommand = systemCommands[i]; if (LOG.isDebugEnabled()) { LOG.debug("Executing command: " + systemCommand); } statusUpdater.setNote("Executing: " + systemCommand); try { systemCommand.execute(); statusUpdater.setProgress(commandsRan / commandCount); } catch (SystemCommandException e) { throw new JobException("Cannot execute command: " + systemCommand, e); } } statusUpdater.setNote("Done."); }