docker / roadmap

Welcome to the Public Roadmap for All Things Docker! We welcome your ideas.
https://github.com/docker/roadmap/projects/1
Creative Commons Zero v1.0 Universal
1.45k stars 244 forks source link

schedule container run on docker swarm #620

Open devMls opened 2 months ago

devMls commented 2 months ago

Tell us about your request I want add option to docker compose deploy called "planned" that allow me Schedule when a container should be executed like this:

deploy: mode: planned start: * //////////////////"cron expression" finish: xx /////////////////// max minutes optional

with this deploy mode that should be compatible with nodes constraints, docker swarm can Schedule containers with a limited live, such as containers for backups or ETL process.

Which service(s) is this request for? Docker swarm and Docker Compose

Tell us about the problem you're trying to solve. What are you trying to do, and why is it hard? I have problems for include in swarm, process like backups for mariadb backup or python functions to move data bettween OLTP and OLAP databases.

this can be usefull to for services related with business hours, but not is my main concern.

Are you currently working around the issue? I use a cron in one host node to run a docker container, but is far to be perfect.

devMls commented 2 months ago

I have found the aproximation of kubernetes to this problem, it can be a way:

https://kubernetes.io/docs/concepts/workloads/controllers/cron-jobs/