Skip to content

docker-compose example with job-run and labels #70

@s-celles

Description

@s-celles

Hello,

I'm trying to run a job periodically using job-run (and not job-exec)

I did a separate docker-compose.yml file like so

version: "3"
services:
  alpine:
    image: alpine
    labels:
      chadburn.enabled: "true"
      chadburn.job-run.datecron.schedule: "@every 5s"
      chadburn.job-run.datecron.command: "uname -a"

but I'm getting nothing in chadburn logs

I changed it to

version: "3"
services:
  alpine:
    image: alpine
    command: uname -a
    labels:
      chadburn.enabled: "true"
      chadburn.job-run.datecron.schedule: "@every 5s"

when I'm doing

docker compose up -d 

I see in alpine-alpine-1 ... Linux... but this command in not run again every 5 seconds.

Can you help me?

I could send a PR to improve doc if you think that it could help your users

Kind regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions