Skip to main content

Job scheduler for Docker containers, configured via container labels.

Project description


.. image::

.. image::

.. image::

**A job scheduler for Docker containers, configured via container labels.**

* Documentation:
* Image repository:
* Code repository:
* Issue tracker:
* Free software: ISC license


- define regular jobs to run within a container context with container and optionally with image
- use date, interval and cron-like triggers
- set a maximum of simultaneously running instances per job
- restrict job scheduling to one container per service
- multi-architecture image supports ``amd64`` and ``armv7l`` platforms, no emulator involved


Let's say you want to dump the database of a Wordpress once a day. Here's a ``docker-compose.yml``
that defines a job that will be handled by *deck-chores*:

.. code-block:: yaml

version: '2'

image: wordpress
image: mariadb
- ./database_dumps:/dumps
deck-chores.dump.command: sh -c "mysqldump --all-databases > /dumps/dump-$$(date -Idate)"
deck-chores.dump.interval: daily

It is however recommended to use scripts with a proper shebang for such actions. Their outputs to
``stdout`` and ``stderr`` as well as their exit code will be logged by *deck-chores*.


At the moment *deck-chores* is designed to run on a single Docker node, not
within a cluster of these. Code and documentation contribution covering this
are highly encouraged.


It wouldn't be as charming to write this piece of software without these projects:

* `APScheduler <>`_ for managing jobs
* `cerberus <>`_ for processing metadata
* `docker-py <>`_ for Docker interaction
* `flake8 <>`_, `mypy <>`_,
`pytest <>`_ and `tox <>`_ for testing
* `Python <>`_



- parse time units for interval triggers
- handle a global limit on concurrent jobs
- print jobs when receiving SIGUSR1
- support for configuring APScheduler's jitter option on Cron- & IntervalTrigger


- keep output of job executions
- a rudimentary web ui


- Frank Sachsenheim (maintaining)
- aeri4list
- alpine-digger
- Brynjar Smári Bjarnason


0.2 (2018-02-23)

* *new*: documentation how to run scheduled jobs only (:issue:`25` by @binnisb)
* *fix*: documentation on cron triggers (:issue:`27` by @alpine-digger)

0.2-rc3 (2017-12-23)

* *changed*: arm builds base on `python:3.6-alpine <>`_
that are executed on an ARMv7l architecture
* *changed*: Updated dependencies *APScheduler* and *docker-py*

0.2-rc2 (2017-08-05)

* *changed*: arm builds base on `arm32v6/python <>`_
* *changed*: therefore ``arm32v6`` replaces the ``arm``-suffix in image tags
* *changed*: there are no more images that get tagged with ``latest-$architecture``

0.2-rc1 (2017-07-01)

* *refactoring*: uses the Python Docker SDK 2 (:issue:`14`)
* *removed*: ``ASSERT_FINGERPRINT`` environment variable
* *renamed*: ``DOCKER_DAEMON`` to ``DOCKER_HOST`` to comply with the SDK
* *fix*: check on fixed labels (:issue:`18` by @aeri4list)
* documentation updates

0.1 (2017-03-02)

* *fix*: docker-py returns ``None`` for labels of images that were created with
older Docker versions (:issue:`7`)

0.1.beta3 (2017-01-22)

* *new*: there's now a build for arm architectures
* *new*: an architecture agnostic manifest is pushed to the image registry for
release images

0.1.beta2 (2016-12-08)

* *new:* set log format per :envvar:LOG_FORMAT
* *new:* an options label to set behavioural flags
* *new:* containers can be identified as a service by configurable labels
* *new:* job definitions for further containers of a service are ignored
(default, opt-out can be configured)
* *new:* image labels can also be parsed for job definitions
(default, opt-out can be configured)

0.1.beta1 (2016-12-04)

* First release with full documentation

Project details

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
deck_chores-0.2-py3-none-any.whl (15.7 kB) Copy SHA256 hash SHA256 Wheel 3.6 Jan 22, 2018
deck-chores-0.2.tar.gz (32.2 kB) Copy SHA256 hash SHA256 Source None Jan 22, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page