Getting Started
One curl command. Start simple and unlock more intelligence as you go.
Start with a heartbeat
Add one line to your job. When the ping doesn't arrive on time, CronDoctor knows something is wrong.
curl -s https://crondoctor.com/api/v1/ping/YOUR_IDCheck-in missed. Expected at 03:00 UTC.
You get: missed and late job detection, grace periods, recovery alerts.
Add duration
Signal 1Add one query parameter. Now CronDoctor learns what "normal" looks like for this job and catches performance drift — even when the job "succeeds."
curl -s "https://crondoctor.com/api/v1/ping/YOUR_ID?duration=$SECONDS"Ran in 247s — 4x your P95 baseline of 62s. Something is degrading.
You unlock: adaptive thresholds (P95 + 20% buffer by default, configurable on Pro), duration trend tracking, "slow" alerts.
Add error context
Signal 2When your job fails, POST the exit code and stderr. CronDoctor's AI analyzes the failure, tells you what likely went wrong, and suggests a fix to investigate.
curl -X POST "https://crondoctor.com/api/v1/ping/YOUR_ID/fail" \
-H "Content-Type: application/json" \
-d '{ "exit_code": 1,
"stderr": "$(tail -100 /tmp/err.log)" }'Failed after 247s — 4x your P95 baseline of 62s.
df -h /var/data && sudo journalctl --vacuum-size=500MYou unlock: AI root cause diagnosis, suggested fix commands, confidence scoring.
Full integration examples
Copy-paste examples in your language. Signal 1 (heartbeat with duration) and Signal 2 (error context on failure) — use one or both.
SECONDS=0
/path/to/backup.sh
curl -s "https://crondoctor.com/api/v1/ping/YOUR_ID\\
?duration=$SECONDS"import time, requests
start = time.time()
run_job()
requests.get(
f"https://crondoctor.com/api/v1/ping/{monitor_id}",
params={"duration": time.time() - start}
)const start = Date.now();
await runJob();
await fetch(
`https://crondoctor.com/api/v1/ping/${monitorId}`
+ `?duration=${(Date.now() - start) / 1000}`
);/path/to/backup.sh 2>/tmp/err.log
EXIT_CODE=$?
if [ $EXIT_CODE -ne 0 ]; then
curl -X POST \\
"https://crondoctor.com/api/v1/ping/YOUR_ID/fail" \\
-H "Content-Type: application/json" \\
-d "{
\"exit_code\": $EXIT_CODE,
\"stderr\": \"$(cat /tmp/err.log)\"
}"
fitry:
run_job()
except Exception as e:
requests.post(
f"https://crondoctor.com/api/v1/ping/{monitor_id}/fail",
json={
"exit_code": 1,
"stderr": str(e)
}
)try {
await runJob();
} catch (err) {
await fetch(
`https://crondoctor.com/api/v1/ping/${monitorId}/fail`,
{
method: "POST",
headers: {
"Content-Type": "application/json"
},
body: JSON.stringify({
exit_code: 1,
stderr: err.message
})
}
);
}See the difference yourself
Set up in under a minute. Start with a bare ping and add more when you're ready.
What each data field unlocks
- ping aloneStandard monitoring — missed and late job detection
- + durationAdaptive thresholds — CronDoctor learns your job's normal runtime and flags performance anomalies automatically
- + exit_codeFailure detection — non-zero exit codes trigger alerts, signal codes (like 137 = OOM killed) provide context
- + stderrAI root cause diagnosis — error output lets the AI pinpoint the exact problem and suggest a fix
- + stdoutAdditional context for the AI when stderr alone isn't enough
Start with a simple ping. Add more data as you need deeper insights. All capabilities are included on every plan.