Host agent for Cronmanager – manages crontabs, tracks job executions, and exposes a secure API.
10K+
cs1711/cronmanager-agent
The agent is the privileged backend component of the Cronmanager stack. It manages crontab files, launches and tracks job executions, enforces execution time limits, and exposes a HMAC-SHA256-secured REST API consumed by the web UI.
This image is part of a stack. The recommended way to run it is together with
cs1711/cronmanager-webandmariadb:ltsusing the provided Compose file.
curl -fsSL https://raw.githubusercontent.com/csoscd/cronmanager/main/docker/docker-compose-full.yml \
-o docker-compose-full.yml
# Create a .env file with the required variables (see below), then:
docker compose -f docker-compose-full.yml up -d
Open http://<your-host>:8880/ — a setup wizard creates the initial admin account on first visit.
What this container does
- Reads and writes crontab files for managed Linux users
- Runs each job via a wrapper script that reports start/finish events and captures output
- Stores execution history, exit codes, and output in MariaDB
- Enforces per-job execution time limits; sends SIGTERM to the process group when auto-kill is enabled
- Sends email alerts via SMTP on job failure or when an execution limit is exceeded
- Applies database schema migrations automatically on startup
- Restores all active crontab entries on every container start (safe after redeploys)
Required environment variables
AGENT_HMAC_SECRET – Shared signing secret — must match the web container (openssl rand -hex 32)
DB_PASSWORD – MariaDB application user password
DB_NAME – Database name (default: cronmanager)
DB_USER – Database user (default: cronmanager)
Optional environment variables
AGENT_BIND_ADDRESS – Listen address (default: 0.0.0.0)
AGENT_PORT – Listen port (default: 8865)
DB_HOST – MariaDB hostname (default: cronmanager-db)
LOG_LEVEL – debug, info, warning, error (default: info)
LOG_MAX_DAYS – Log retention in days (default: 30)
MAIL_ENABLED – Enable SMTP failure alerts (default: false)
MAIL_HOST – SMTP server hostname (default: smtp.example.com)
MAIL_PORT – SMTP port (default: 587)
MAIL_USERNAME – SMTP username
MAIL_PASSWORD – SMTP password
MAIL_FROM – Sender address (default: [email protected])
MAIL_TO – Alert recipient (default: [email protected])
MAIL_ENCRYPTION – tls (STARTTLS) or ssl (SMTPS) (default: tls)
SSH keys for remote job execution
Mount an SSH directory with keys and a config file to enable jobs that run on remote hosts:
volumes:
- /root/.ssh:/root/.ssh:ro
Ports
8865/tcp – Agent REST API (internal — do not expose publicly)
Links
- https://github.com/csoscd/cronmanager
- https://hub.docker.com/r/cs1711/cronmanager-web
Content type
Image
Digest
sha256:7ab20145e…
Size
52 MB
Last updated
2 days ago
docker pull cs1711/cronmanager-agent