@Override protected void preStart() { final Callable<SshPollValue> getAttributesFromKnife = new Callable<SshPollValue>() { public SshPollValue call() throws Exception { ProcessTaskWrapper<String> taskWrapper = knifeTaskFactory.newTask(); final ExecutionContext executionContext = ((EntityInternal) entity).getManagementSupport().getExecutionContext(); log.debug("START: Running knife to query attributes of Chef node {}", nodeName); executionContext.submit(taskWrapper); taskWrapper.block(); log.debug("DONE: Running knife to query attributes of Chef node {}", nodeName); return new SshPollValue(null, taskWrapper.getExitCode(), taskWrapper.getStdout(), taskWrapper.getStderr()); } }; ((Poller<SshPollValue>) poller).scheduleAtFixedRate( new CallInEntityExecutionContext<SshPollValue>(entity, getAttributesFromKnife), new SendChefAttributesToSensors(entity, chefAttributeSensors), periodUnits.toMillis(period)); }