version: "3" services: app: image: containrrr/shepherd environment: TZ: 'Europe/Copenhagen' FILTER_SERVICES: '' IGNORELIST_SERVICES: '' RUN_ONCE_AND_EXIT: "true" volumes: - /var/run/docker.sock:/var/run/docker.sock:ro deploy: replicas: 0 restart_policy: condition: none labels: - swarm.cronjob.enable=true - swarm.cronjob.schedule=0 1 * * * - swarm.cronjob.skip-running=true placement: constraints: - node.role == manager scheduler: image: crazymax/swarm-cronjob:latest volumes: - /var/run/docker.sock:/var/run/docker.sock:ro environment: - "TZ=Europe/Copenhagen" - "LOG_LEVEL=info" - "LOG_JSON=false" deploy: placement: constraints: - node.role == manager