Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › cron jobs

Node.js Health Checks and Cron Monitoring: Use Heartbeats for Job Uptime

By Freedom251 Team · · 4 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A Node.js /health route can show whether a service instance is alive or ready to receive traffic; it cannot prove that a scheduled report, backup, import, or queue task completed. Monitor those jobs separately with an external heartbeat: send success only after the work finishes, and let the monitor alert when the expected signal is late.

How do I know if my health check endpoint is working?

First decide what the endpoint is meant to tell its caller. A probe that reports whether the process should keep running answers a different question from one that says whether the instance should receive requests. For Kubernetes, these are liveness and readiness probes; a startup probe can defer the other checks while an application initializes. Other platforms may use different labels or behavior. See the Kubernetes probe documentation.

As an Amazon Associate I earn from qualifying purchases.

Keep liveness focused on the process

A failed Kubernetes liveness probe can lead to a container restart. Avoid making liveness fail simply because a downstream service is temporarily unavailable if the Node.js process itself is still functioning: doing so can turn a dependency outage into unnecessary restarts. Liveness is for detecting a process that should no longer continue running.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use readiness to control traffic

Readiness indicates whether an instance should receive traffic. If the application cannot serve requests safely, a failed readiness check can communicate that it should stop receiving them while it recovers. Keep the route fast and bounded, and define what “ready” means for the service rather than treating every dependency as an automatic reason to restart the process.

#1 Best Overall
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
  • Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM)
  • Includes 128GB Micro SD Card pre-loaded with 64-bit Raspberry Pi OS, USB MicroSD Card Reader
  • CanaKit Turbine Black Case for the Raspberry Pi 5
  • CanaKit Low Noise Bearing System Fan
  • Mega Heat Sink - Black Anodized

Account for slow startup

If initialization takes time, Kubernetes startup probes can prevent liveness and readiness checks from acting too early. Configure the route and the deployment’s probe settings together: an endpoint only helps if the platform calls it at the right time and interprets its result as intended.

A health route is not a process supervisor. Node.js v26.10.0 documentation warns that it is not safe to resume normal operation after an uncaughtException, and recommends using an external monitor in a separate process to detect failures and recover or restart as appropriate. See the Node.js process documentation.

Rank #2
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
  • Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM)
  • Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
  • CanaKit Premium High-Gloss Raspberry Pi 4 Case with Integrated Fan Mount, CanaKit Low Noise Bearing System Fan
  • CanaKit 3.5A USB-C Raspberry Pi 4 Power Supply (US Plug) with Noise Filter, Set of Heat Sinks, Display Cable - 6 foot (Supports up to 4K60p)
  • CanaKit USB-C PiSwitch (On/Off Power Switch for Raspberry Pi 4)

How do I monitor my cron jobs?

Create an external heartbeat check for each independently important scheduled job. The monitor provides a unique ping URL and expects a request on the schedule you configure. If that request does not arrive within the expected interval and grace period, it can alert that the job is late or down. Because the monitor is outside the job’s process, it can detect a missed run even when the job crashes before it can log or report the problem.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Choose a schedule that matches the job

  • Regular cadence: Set an expected interval and a realistic grace period for jobs that run at a steady frequency.
  • Wall-clock schedule: Use a cron or calendar schedule when the job is intended to run at a particular time, such as nightly. Set the timezone used by the machine running the scheduler and allow for ordinary startup and runtime variation.

A monitor’s grace period is the time it tolerates a missed expected signal before alerting. Too little grace can create alerts for normal delays; too much can delay detection. Choose it with the scheduler’s actual timing and the cost of a late alert in mind.

Rank #3
UCTRONICS 19” 1U Rack Mount for Raspberry Pi with SSD Mounting Brackets, Thumbscrews Front Removable Bracket Supports Up to 4 Raspberry Pi 5, 3B/3B+, 4B and 4 SSDs, Option SD Card Adapter
  • Design for Raspberry Pi: Supports installation of 4 Raspberry Pis and 4 ssds, compatible with any 2.5” Solid State Drive (7mm/9mm) and Rpi 4B/3B+, and other B/B+ models.
  • The SSD mounting bracket also has two holes reserved for the SD card extension adapter ASIN: B09CKRDFTH, which allows you to access the SD card from the front of the rack.
  • Easy to Setup: Just use two included thumbscrews to mount the rackmount, which adopts a screw-in design, which helps you install and replace quickly and easily, no tools needed!
  • Applications: This is a hardware solution to get ingenious use of the Raspberry Pi, with this kit and open source software OpenMediaVault, you can use the Pi as a NAS Server, Surveillance station, or even a Web server.
  • Optional accessories: Single mounting bracket: B09GFQLPTY; Micro SD card extension adapter ASIN: B09CKRDFTH. I/O Panel: B09FXRQPFM

Send success only after useful work is complete

A start signal can show that a job began, while a success signal confirms it reached its meaningful completion point. For a job whose run time varies, configure the monitor to expect the completion signal within an appropriate window after the start. Never send success from a finally block that also runs after errors: that would mark a failed run as healthy.

  1. Record the task start and, if supported and useful, send a start signal.
  2. Run the scheduled work while preserving its exit status and useful diagnostic output.
  3. Send the success signal only when the work has completed successfully.
  4. On failure, send an explicit failure signal with safe diagnostic context, then return a nonzero exit code to the scheduler.

Keep heartbeat URLs secret. Treat each URL as a capability that can report a job’s status; do not put it in source control, public logs, or output visible to clients.

Rank #4
Pironman 5-MAX Raspberry Pi 5 Case Dual NVMe M.2 SSD PCIe, Mini PC NAS RAID 0/1 Hailo-8L AI Accelerator PWM Tower Cooler+Dual RGB Fans, OLED Module, Safe Shutdown, Standard HDMI (RPI5 Not Included)
  • [ULTIMATE RASPBERRY PI 5 CASE & MINI PC] - Unlock the full potential of your Raspberry Pi 5 with the Pironman 5-MAX — the most advanced Raspberry Pi 5 Case for power users. This high-performance Raspberry Pi 5 Cooling Case features dual NVMe M.2 slots with RAID 0/1 support, AI accelerator compatibility ( e.g. Hailo-8l M.2 AI), a PCIe Gen2 switch, a PWM tower cooler + dual RGB fans and a smart OLED display. With its dual transparent panels and optimized cable management (including full-size HDMI), it’s the ideal Raspberry Pi 5 Enclosure for building a high-speed NAS, AI edge computing device, or Home Assistant hub. (Raspberry Pi NOT Included)
  • [DUAL NVMe M.2 SLITS & NAS RAID SUPPORT] - Supercharge your storage with the best Raspberry Pi 5 NVMe Case solution. Featuring two expandable NVMe M.2 slots (2230-2280) powered by a built-in PCIe Gen2 switch, this Raspberry Pi 5 NAS Case supports RAID 0/1 for ultra-fast data setups. Whether you're using a high-speed NVMe SSD or a Hailo-8L AI accelerator, Pironman 5-MAX delivers the ultimate performance boost for advanced Raspberry Pi 5 AI applications and edge computing
  • [ADVANCED COOLING SYSTEM] - Engineered for high-performance builds, Pironman 5-MAX features a powerful tower cooler, one PWM fan, and dual RGB fans for enhanced airflow. The dual transparent panel design improves ventilation while showcasing vibrant RGB lighting. Ideal for cooling both the Raspberry Pi 5 and dual NVMe SSDs or AI accelerators like Hailo-8L, it ensures stable operation under heavy workloads with low noise and long-term durability
  • [SMART OLED DISPLAY WITH VIBRATION WAKE-UP] - Pironman 5-MAX features a 0.96" OLED screen that delivers real-time system insights including CPU usage, memory, temperature, IP address, and disk status. With customizable display options and auto sleep mode, the screen can be instantly reactivated by a light tap thanks to the built-in vibration sensor—offering a smarter and more interactive experience
  • [ENHANCED FUNCTIONALITY] - Pironman 5-MAX empowers your Raspberry Pi 5 with advanced features like safe shutdown via a metal power button, customizable RGB lighting, dual full-size HDMI ports, vibration-triggered OLED wake-up, and an external GPIO extender. It also includes RTC battery support for timekeeping and seamless Home Assistant integration. With detailed guides, online tutorials, and full technical support from SunFounder, setup and use are effortless and worry-free
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Which heartbeat monitor features matter?

Healthchecks.io and Better Stack documentation describe two hosted options for missed-run monitoring. The comparison below is limited to the cited documentation; it does not establish which service is more reliable or less expensive.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Need Healthchecks.io documentation Better Stack documentation
Missed-run detection Unique ping URL, expected timing, and grace period; alerts when a check is late or down. Expected heartbeat frequency and grace period; a missed heartbeat triggers an incident.
Schedule type Simple intervals, cron, and systemd OnCalendar schedules; cron checks require a timezone. The cited heartbeat page describes a periodic cron-style example; verify exact schedule options for your use case.
Failure reporting Optional start and failure signals. A /fail path and documented reporting of exit-code and output information.
Other configuration considerations Schedule model, timezone, grace period, allowed HTTP method, and integrations. Frequency, grace period, escalation settings, and failure-payload needs.

See Healthchecks.io documentation, its cron and schedule configuration guide, and Better Stack heartbeat-monitoring documentation. Check the current product documentation for schedule details and integrations relevant to your deployment.

How should health checks and heartbeats work together?

Use each signal for the failure it can actually detect. A platform probe answers whether a running service instance should continue or receive traffic. A job heartbeat answers whether an independently scheduled task reached its expected completion point. A service can pass its health check while a nightly export has silently stopped running; a heartbeat can report that missed run without changing how the service’s HTTP health route works.

Quick Recap

Bestseller No. 1
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
CanaKit Raspberry Pi 5 Starter Kit PRO - Turbine Black (128GB Edition) (8GB RAM)
Includes Raspberry Pi 5 with 2.4Ghz 64-bit quad-core CPU (8GB RAM); CanaKit Turbine Black Case for the Raspberry Pi 5
$259.95
Bestseller No. 2
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
CanaKit Raspberry Pi 4 4GB Starter PRO Kit - 4GB RAM
Includes Raspberry Pi 4 4GB Model B with 1.5GHz 64-bit quad-core CPU (4GB RAM); Includes Pre-Loaded 32GB EVO+ Micro SD Card (Class 10), USB MicroSD Card Reader
$159.99
  • Use liveness, readiness, and startup behavior according to the deployment platform’s semantics.
  • Give each important scheduled task its own descriptive check and schedule.
  • Route alerts to people or systems that can act on them, and include enough safe failure context to aid diagnosis.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

cron jobsHealth Checksheartbeat monitoringNode.jsuptime monitoring

Leave a Reply

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

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.