Sign inSign up

tinslice/crontab

By tinslice

Updated over 6 years ago

Docker image that can be used to run cron jobs using environment variables.

Image
0

2.5K

tinslice/crontab repository overview

docker-crontab

Docker Automated build Docker Build Status Docker Pulls license

Docker image for running cron jobs.

Synchronize files example project https://github.com/arcane-io/docker-cron .

Usage

In order to create cron jobs add environment properties that start with 'CRON_' (the name must be unique) and have the value with the format <cron-value> <command>.

The cron commands output can be found in '/var/log/cron.log' .

Examples

docker run --rm -e CRON_SAMPLE="* * * * * echo 1 minute cron"  tinslice/crontab
docker-compose example
version: '3.7'

services:
  cron:
    image: tinslice/crontab
    container_name: crontab
    environment: 
      CRON_SAMPLE: '* * * * * echo 1 minute cron'
      CRON_ANOTHER_SAMPLE: '*/5 * * * * echo 5 minute cron'
      CRON_ERROR_SAMPLE: '*/3 * * * * no-valid-command'

Check logs

docker logs -f crontab

Tag summary

Content type

Image

Digest

Size

21 MB

Last updated

over 6 years ago

docker pull tinslice/crontab