Cron-Ping

Documentation

Cron-Ping works on a simple principle: your script calls a URL after each run. If the call doesn't arrive on time, we alert you. No library to install.

The three ping types

Example with curl

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

# Wrap a command: start, then success or fail
curl -fsS https://cron-ping.com/p/<token>/start
if /opt/my-script.sh; then
  curl -fsS https://cron-ping.com/p/<token>
else
  curl -fsS https://cron-ping.com/p/<token>/fail
fi

In a crontab

# every day at 3am, ping only if the script succeeds
0 3 * * * /opt/backup.sh && curl -fsS https://cron-ping.com/p/<token>

Capture logs (post-mortem debugging)

Send your command output as POST: we keep the last 1000 characters.

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

With 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 a Dockerfile / healthcheck

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

Monitor this task in 2 minutes with Cron-Ping

Start for free