A scheduler for docker containers, made easy
Project description
A scheduler for docker containers, made easy. Configure the desired schedule per each container and the library ensures the container will be running at the correct timing.
Usage
To start the scheduler, run the command below
import container_scheduler
schedules = [
{"container": "container_name_1", "crontab": "*/1 * * * *"},
{"container": "container_name_2", "crontab": "0 4 * * *"}
]
container_scheduler.start(schedules)
The function start is synchronous and will not return until the scheduler is running. To stop it gracefully, you can send a SIGTERM or a SIGKILL signal.
The library was originally developed to work in a docker container, acting as a scheduler container for other containers (take a look at docker-container-scheduler)
Meta
Yusef Maali - contact@yusefmaali.net
The scheduling is executed by the schedule-cronjob library, a fork of the excellent schedule from Daniel Bader.
Distributed under the MIT license. See LICENSE.txt for more information.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file container-scheduler-1.0.0.tar.gz
.
File metadata
- Download URL: container-scheduler-1.0.0.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e8dc2b6caaaac1fea3173bd9a20ba7f6a76c058ae9683bb1f34a9667ebc694e |
|
MD5 | 27c2e76becdbf3a19bdec49490ddc43e |
|
BLAKE2b-256 | 94f9d200c0d929a8fef53a483bd3c457143d77016096c23c0a9c683d097580bd |
File details
Details for the file container_scheduler-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: container_scheduler-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b733bdc506ae5ee777a2e119aee7d5cb2ce88e7f7923b4d14a2a845e087f0938 |
|
MD5 | 5ec628cd8525ae8694150bc7dd9db781 |
|
BLAKE2b-256 | 0da8ae42f8536a67754a406f711644f29fca3b2564c798f58352e6c5159defa6 |