Skip to content

Instantly share code, notes, and snippets.

@trekdemo
Created December 4, 2015 10:18
Show Gist options
  • Save trekdemo/16b380cf9db61aaaf4a6 to your computer and use it in GitHub Desktop.
Save trekdemo/16b380cf9db61aaaf4a6 to your computer and use it in GitHub Desktop.

Revisions

  1. trekdemo created this gist Dec 4, 2015.
    16 changes: 16 additions & 0 deletions cronitor.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    function cronitor {
    if [ $# -ne 2 ]; then return; fi
    if [ -z "$1" ]; then return; fi
    if [ -z "$2" ]; then return; fi

    echo "Sending signal to - https://cronitor.link/${2}/${1}"
    curl "https://cronitor.link/${2}/${1}" -m 10
    }

    # Usage
    # cornitor <ping-endpoing> <identifier>
    # https://cronitor.io/help/understanding-ping-urls

    cronitor "run" "xyz"
    cronitor "complete" "xyz"
    cronitor "fail" "xyz"