Using Cronitor to monitor failing scripts

#!/bin/bash
set -eux
CRONITOR_ID=""

curl https://cronitor.link/${CRONITOR_ID}/run -m 10 &

trap 'curl https://cronitor.link/${CRONITOR_ID}/fail -m 10' ERR

add commands here...

curl https://cronitor.link/${CRONITOR_ID}/complete -m 10