Cron-Ping
InloggenGratis beginnen

Documentatie

Cron-Ping werkt op een simpel principe: je script roept een URL aan na elke run. Komt die call niet op tijd binnen, dan waarschuwen we je. Geen library om te installeren.

De drie soorten pings

Voorbeeld met curl

# Success-ping (meest voorkomend)
curl -fsS https://cron-ping.com/p/<token>

# Een commando omhullen: start, daarna succes of fout
curl -fsS https://cron-ping.com/p/<token>/start
if /opt/mon-script.sh; then
  curl -fsS https://cron-ping.com/p/<token>
else
  curl -fsS https://cron-ping.com/p/<token>/fail
fi

In een crontab

# elke dag om 3 uur, ping alleen als het script slaagt
0 3 * * * /opt/backup.sh && curl -fsS https://cron-ping.com/p/<token>

Zoek je de crontab-regel zelf — curl-flags, % escapen, overlap voorkomen? Bekijk de gids cron elke 5 minuten.

Logs vastleggen (post-mortem debuggen)

Stuur de uitvoer van je commando als POST: we bewaren de laatste 1000 tekens.

m=$(/opt/mon-script.sh 2>&1) && curl -fsS --data-raw "$m" https://cron-ping.com/p/<token>

Met wget

wget -q -O /dev/null https://cron-ping.com/p/<token>

In Python

import urllib.request
urllib.request.urlopen("https://cron-ping.com/p/<token>", timeout=10)

In een Dockerfile / healthcheck

HEALTHCHECK CMD curl -fsS https://cron-ping.com/p/<token> || exit 1

Monitor deze taak in 2 minuten met Cron-Ping

Gratis beginnen