$crond.io
integrations / docker

Cron Monitoring in Docker Containers

crond-agent is a single static Go binary, ~6 MB, no runtime dependencies. Drop it in your image or run it as a sidecar.

Pattern A: bake it into your image

Simplest path — install during build and use as the entrypoint:

# Dockerfile
FROM alpine:3.19
RUN apk add --no-cache curl ca-certificates
RUN curl -sSL crond.io/install | sh
COPY backup.sh /app/
RUN chmod +x /app/backup.sh
ENTRYPOINT ["crond-agent", "wrap", "--name", "backup", "--"]
CMD ["/app/backup.sh"]

The ENTRYPOINT/CMD split means callers can override the actual job with docker run image /other/command and still get the wrapper behavior.

Pattern B: sidecar via shared volume

When you can't modify the image (third-party container, vendor-supplied job), mount the agent from a sidecar:

# docker-compose.yml
services:
crond-installer:
image: ghcr.io/crond-io/crond-agent:latest
command: ["cp", "/usr/local/bin/crond-agent", "/shared/"]
volumes: ["shared:/shared"]
backup:
image: postgres:16
depends_on: [crond-installer]
volumes: ["shared:/shared:ro"]
environment:
CROND_PING_KEY: ${CROND_PING_KEY}
command: ["/shared/crond-agent", "wrap", "--name", "pg-backup", "--", "pg_dump", ...]
volumes:
shared:

Pattern C: ping at the end (no agent)

If you don't want the agent dependency at all, append a curl ping to your command:

CMD sh -c "/app/backup.sh && curl -fsS https://api.crond.io/ping/$CROND_PING_KEY"

Tradeoff: you only get the success ping, not exit code, duration, or output capture. Fine for simple scripts; the wrapped approach scales better as monitoring needs grow.

Image hosting

  • Public: ghcr.io/crond-io/crond-agent:latest (multi-arch: amd64, arm64)
  • Specific version: ghcr.io/crond-io/crond-agent:v1.4.2
  • Distroless option: ghcr.io/crond-io/crond-agent:v1.4.2-distroless — minimal attack surface for high-security environments

Docker Swarm services

For Swarm-scheduled tasks running on a cron-like cadence, deploy a service with a cron sidecar inside the container (using supercronic or similar) and wrap each job with crond-agent.