Overview and install
The host agent is one command, cronbeat, for cron jobs and systemd timers on Linux servers and VMs. You put it in
front of your job: cronbeat run --name nightly-backup -- /opt/backup.sh. It starts the job, passes its exit code
through unchanged, measures the run time and tells CronBeat that the run started and how it ended. CronBeat then alerts
you when the job does not run, fails or runs too long. You do not add any ping call to your scripts.
The host agent is available on every plan (Free: 1 host, Pro: 10, Enterprise: 100), see Plans and limits. Every job you wrap is a monitor and also counts toward your monitor limit.
What is it for
Section titled “What is it for”Most cron jobs run on plain Linux servers, not in Kubernetes. A failing script, a deleted crontab line or a powered-off
VM produces no error you could alert on. With cronbeat run in front of the job, CronBeat learns about every start and
every result, including the exit code, the signal that killed the job and, for a failed run, the last lines of its output.
When to use it
Section titled “When to use it”| Method | Use it when | Page |
|---|---|---|
Host agent (cronbeat run) |
Your jobs run from crontab, /etc/cron.d, a systemd timer or a container on a Linux machine, and you want exit codes, failure output and a monitor created for you. |
This section |
Ping URL (curl) |
You cannot install a program, the job runs somewhere other than Linux (CI, a PaaS, an application scheduler), or you want the smallest possible change. | Ping endpoints, Code examples |
| Kubernetes agent | The jobs are Kubernetes CronJobs and you want them discovered automatically. | Kubernetes agent |
The three methods can be mixed in one project. A host agent monitor and a ping monitor behave the same way once they exist: same statuses, same incidents, same channels.
How it works
Section titled “How it works”- No daemon and no background process.
cronbeat runlives only as long as the job. Cron, a systemd timer or you start it, it starts your command, waits for it and exits with the exit code of your command. The binary is a single static file of about 6 MB, with no dependencies. - It reports twice per run. A
startedevent when the job starts, asucceededorfailedevent when it ends. The start event makes CronBeat show the monitor asrunningand lets it detect a job that never finishes. - It never harms your job. A missing key, a network outage or an error from CronBeat is a short warning on stderr, the job still runs and its exit code is unchanged.
- The first run creates the monitor. The first event of a new job name creates a monitor with the schedule you passed. The schedule, time zone and name then belong to the command line: when you change them in your crontab, the monitor follows.
Requirements
Section titled “Requirements”- Linux on amd64 (x86_64) or arm64 (aarch64). macOS, Windows and 32-bit ARM are not supported.
- Outbound HTTPS to
api.cronbeat.devfrom the machine that runs the job. curlorwget,tarandsha256sum(orshasum) for the installer. Nothing else.- A host agent key. Create it in the app under Agents: choose Linux server (cron jobs), enter a server name (letters,
digits,
.,_and-, up to 63 characters) and copy the key. It starts withcb_agent_and is shown once.
Quickstart in 3 minutes
Section titled “Quickstart in 3 minutes”1. Create the key. In the app open Agents, choose Linux server (cron jobs), name the server and press Create host agent. Copy the key.
2. Install the command on the server:
curl -fsSL https://docs.cronbeat.dev/install.sh | sh3. Store the key. Run this as the user whose jobs you want to monitor (root for /etc/crontab and /etc/cron.d).
It asks for the key with hidden input and saves it with mode 0600:
cronbeat configure4. Wrap one job. In crontab -e, put cronbeat run in front of the command and tell it the schedule:
0 2 * * * /usr/local/bin/cronbeat run --name nightly-backup --schedule '0 2 * * *' -- /opt/backup.sh --fullOr wrap the whole crontab in one step. plan shows what would change and writes nothing, apply makes a backup,
writes and verifies, undo restores the backup. See Crontab helper.
cronbeat crontab plancronbeat crontab apply5. Check. Verify the key, then run a job by hand once so the monitor appears right away:
cronbeat checkcronbeat run --name nightly-backup --schedule "0 2 * * *" --verbose -- /opt/backup.sh --fullcheck prints OK: the API key is valid, the name of the host agent and where the key came from. In the app the
Agents page shows Last run reported … and the Monitors list shows the job with the label Host agent.
What the installer does
Section titled “What the installer does”install.sh is a short POSIX shell script, you can read it before running it
(curl -fsSL https://docs.cronbeat.dev/install.sh | less).
- Detects Linux and the CPU (
x86_64oraarch64). Anything else stops with an error. - Downloads
cronbeat_<version>_linux_<arch>.tar.gzandSHA256SUMSfrom the GitHub releasehost-v<version>of the publiccronbeat-agentrepository, over HTTPS. - Verifies the checksum. On any mismatch nothing is installed.
- Extracts only the
cronbeatfile, runscronbeat versionto confirm the version and installs it to/usr/local/bin. When that directory is not writable it uses~/.local/binand tells you to add it to yourPATH. Cron has a shortPATH, so use the absolute path in crontabs.
cronbeat: command not found after installing without root
Section titled “cronbeat: command not found after installing without root”When the installer put the file in ~/.local/bin, that directory has to be on your PATH. For the current session:
export PATH="$HOME/.local/bin:$PATH"To keep it for every new session, add the same line to your shell startup file and reload it:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc. ~/.bashrcUse ~/.zshrc instead of ~/.bashrc if your shell is zsh. This only changes your interactive shell. Cron does not read
these files, so in a crontab always write the absolute path (for example /home/ubuntu/.local/bin/cronbeat), or let
cronbeat crontab apply write it for you. To skip the PATH step altogether, install for
all users: curl -fsSL https://docs.cronbeat.dev/install.sh | sudo sh puts it in /usr/local/bin.
| Variable | Meaning |
|---|---|
CRONBEAT_VERSION |
Install another version than the default of the script. |
CRONBEAT_INSTALL_DIR |
Install into this directory. |
CRONBEAT_DOWNLOAD_BASE |
Download from a mirror of the release assets (HTTPS, or HTTP for localhost). |
Release files also carry a build provenance attestation. To verify a downloaded archive by hand:
sha256sum -c SHA256SUMS --ignore-missinggh attestation verify cronbeat_0.1.0_linux_amd64.tar.gz --repo nuricanozturk01/cronbeat-agentTo update, run the installer again. The Agents page shows Update available next to a host agent when a newer
version is published and CronBeat knows about it. cronbeat version prints the installed version.
What happens when
Section titled “What happens when”| Situation | Result |
|---|---|
You run a new job name with --schedule the first time |
A monitor with that cron schedule is created, with a grace period of 5 minutes unless you pass --grace. |
| You change the schedule, time zone or name in your crontab | The next run updates the monitor. |
| The job fails (exit code other than 0) | The monitor goes down at once with exit code N or the signal, and the last 4 KB of the output is attached. |
| The job never starts (cron line deleted, server off) | The monitor becomes late, then down with the reason missed after the grace period. |
| The job starts and never ends | Reason too_long when a maximum runtime is set, otherwise missed (“started but never finished”). |
| CronBeat is unreachable during a run | The job runs normally. The lost reports can make the monitor late or down, see Troubleshooting. |
| You delete the monitor in the app | The next wrapped run creates it again, as a new monitor without the old history. |
| The plan allows fewer hosts or monitors | See Plans and limits: the job keeps running, the warning on stderr names the limit. |
Next steps
Section titled “Next steps”- The run command: every flag, exit codes, output and time zones.
- Crontab helper: wrap a whole crontab safely.
- systemd timers and Docker.
- Data and security: what is sent, what never is.
- Troubleshooting.

