<p>I have 3 vps with docker installed. I have created a docker image and I would like to know if there is a possibility to configure docker or docker-compose in such a way that these 3 containers run only once a day at random hours.</p>
<p>I have not found any way other than to configure the command to start the docker in a bash script, called from the Linux crontab, which waits for a while at random. Are there better better solutions?
Maybe k8s / k3s?</p>

Marco Paggioro
<p>If &quot;randomness&quot; is part of your application behaviour, then you should contain this logic inside one of services / containers, so this is no-brainer. You are running entire stack with <code>docker-compose</code> and it just works.</p>
<p>Other than that <code>Crontab</code> or other external scheduler (like kubernetes cron jobs) is the way of doing that if running those three containers on random time once a day is your requirement of using those docker services.</p>
