Cron Job Monitoring for NodeJS applications and scripts
Cron monitoring in NodeJS #
Oh Dear users can add cron job monitoring to any existing NodeJS script. When you create a cronjob monitor in your Oh Dear account, you're given a unique pingback URL that should be called every time a cronjob completes.
In this guide, we'll cover how you can implement that in your existing NodeJS code.
Cron job monitoring in generic NodeJS #
You can use the built-in functions from
https to make outgoing network calls.
var https = require('https'); https.get("https://ping.ohdear.app/e536e771-9ff6");
Note: make sure your script stops executing on error conditions, so the
https.get function isn't called even if the script has failed.