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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.