Skip to main content

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.

https://github.com/yusefmaali/container-scheduler

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

container-scheduler-1.0.0.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

container_scheduler-1.0.0-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page