final void lockAndDelete() {
        LOGGER.info(TASK_NAME + " - Start");
        clusterLockService.tryLock(LOCK_NAME, () -> {
            try {
                if (!Thread.currentThread().isInterrupted()) {
                    final LogExecutionTime logExecutionTime = new LogExecutionTime();

                    final StroomDuration deleteAge = processorConfig.getDeleteAge();

                    if (!deleteAge.isZero()) {
                        final Instant deleteThreshold = TimeUtils.durationToThreshold(deleteAge);
                        LOGGER.info(TASK_NAME + " - Using deleteAge: {}, deleteThreshold: {}",
                                deleteAge,
                                deleteThreshold);
                        // Delete qualifying records prior to this date.
                        delete(deleteThreshold);
                    }
                    LOGGER.info(TASK_NAME + " - Finished in {}", logExecutionTime);
                }
            } catch (final RuntimeException e) {
                LOGGER.error(e.getMessage(), e);
            }
        });
    }
Synchronised as we don't want to run more than once concurrently.
stroom-processor/stroom-processor-impl-db/src/main/java/stroom/processor/impl/db/ProcessorTaskDeleteExecutorImpl.java