I have a Logstash container that keeps two data sources sync. When it runs, it queries non-synced entries in one database and posts them into the other. I would like to run this container say every 10 seconds.
What I have been doing is to specify --restart=always
so that when the container exits, it restarts itself, around which takes around 5 seconds, which is a bit too often for this use case.
Does Docker support what I want to achieve (waiting X seconds between restarts, or any kind of scheduling) or should I remove the restart policy and schedule it with cron to run every 10 seconds?