Retry job with set timeout between retries


I have a job that fails from time to time, because the server is being restarted. I would like to setup a retry job but with a specific timeout between retries. something like 5 mins. Is anyone aware of a way to achieve this, just using the gitlab yaml, not having to create file flags?