Bash
Signal the start, run the work, then send the exit status with the last lines of output as the body.
#!/usr/bin/env bash
URL=https://staging.crony.sh/ping/f3a1c6e2-8d4b-4c7a-9e15-2b6d0c9a7f31
curl -fsS -m 10 --retry 5 -o /dev/null "$URL/start"
output=$(/usr/local/bin/backup.sh 2>&1)
status=$?
echo "$output" | tail -c 10000 | curl -fsS -m 10 --retry 5 -o /dev/null --data-binary @- "$URL/$status"
exit $statusThe script exits with the job's own status, so whatever runs it still sees the failure.