Sign inSign up

amaelh/rpi-cron

By amaelh

Updated over 6 years ago

RPi-compatible Docker Image - example usage of a cron job in a container

Image
0

1.5K

amaelh/rpi-cron repository overview

rpi-cron

Simple CRON image based on hypriot/rpi-cron-example

General Usage

Minimal debian image to schedule scripts in a docker image. This image is intented to be used with docker-compose.

Requirement : mount a volume on /etc/cron.d

  • The host folder as well as it's contents have to be owned by root:root with no write access to group nor others.
  • Each script inside the host folder has to be executable (a+x)

Examples

Example crontab file :

#
# Every 5 minutes
*/5 * * * * root bash /scripts/update_duck_dns.sh >> /var/log/cron.log 2>&1

Example docker-compose file :

version: "2.0"

services:

  cron:
    image: amaelh/rpi-cron
    restart: always
    volumes:
      - "./conf/crontab:/etc/cron.d"
      - "./scripts/:/scripts"

Tag summary

Content type

Image

Digest

Size

90.2 MB

Last updated

over 6 years ago

docker pull amaelh/rpi-cron