Would it be an idea to allow to run a command before a retry or before last retry, e.g. restart a service, reload db etc. CommandBeforeRetry=sqlcmd delete from tableX CommandBeforeLastRetry=gradlew restartX && wait 60 Maybe I could add this and make PR for your review ?