Docker

Wrap the container's command so it reports its start and exit status. The image needs curl; with BusyBox, wget -q -O /dev/null works the same way.

docker run --rm \
  -e PING_URL=https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31 \
  backup-image \
  sh -c 'curl -fsS -m 10 --retry 5 -o /dev/null "$PING_URL/start";
         /app/backup; status=$?;
         curl -fsS -m 10 --retry 5 -o /dev/null "$PING_URL/$status"; exit $status'

To watch a long-running service, ping from its health check once the service's own test passes. Use an interval schedule a little longer than the health check's interval. The ping's own result is ignored, so an unreachable monitor never marks the container unhealthy.

HEALTHCHECK --interval=5m CMD /app/healthcheck && (curl -fsS -m 10 -o /dev/null https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31 || true)