Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix Now×
FREEDOM251

Freedom251 › Blog › cron monitoring

Node.js Cron Health Checks: 5 Heartbeat Controls for Missed Marketplace Jobs

By Freedom251 Team · · 6 min read

Free tools Windows power users keep installed

One-click scans. No signup required.

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

To know whether a Node.js cron job really ran and finished, you need two signals: scheduler events from inside the process, and a success heartbeat that an outside monitor expects on a schedule. The first explains what happened to individual executions. The second tells you when nothing arrived at all, including when the whole process or host is down. Neither proves your marketplace data is correct. Together they turn a silent missed job (a sync, payout batch, listing expiry or stock refresh that simply stops) into an alert.

Below are five controls, layered from cheapest to most structural. They reduce the chance that a failure goes unnoticed. They are not guarantees, and a heartbeat is not a retry system.

As an Amazon Associate I earn from qualifying purchases.

The five controls at a glance

# Control Detects Blind spot
1 Observe scheduler events Failed, missed, overlapping or skipped executions the scheduler knows about Cannot report that the whole process is down
2 Success heartbeat after useful work Runs that started but never reached the end Does not validate the correctness of the data written
3 Monitor from outside the process A check-in that never arrives, even if the process or host is gone Confirms receipt of a signal, not downstream side effects
4 Deliberate schedule and grace window Late or absent runs without constant false alarms Correct values depend on your job; no source can set them for you
5 Execution infrastructure that fits the requirement Prevents whole classes of loss (restarts, duplicates across instances) More operational burden; still needs monitoring

Why an in-process scheduler can fail silently

A node-cron style schedule lives in memory. The callback only fires if the Node.js process is running and has registered the task. If the process crashes, is redeployed, is out of memory, or the startup code path never reaches the schedule call, no error is raised by the job, because the job never exists. Any monitoring that runs inside that same process goes quiet at exactly the moment you need it.

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

Control 1: Observe scheduler events

The node-cron documentation lists execution events: execution:finished, execution:failed, execution:missed, execution:overlap and execution:skipped. Subscribe to the ones that matter and send them to your logs or metrics, so you can answer “what happened to the 02:00 run?” afterwards.

#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
import cron from 'node-cron';

const task = cron.schedule('*/15 * * * *', syncMarketplaceOrders, {
  timezone: 'UTC',
  name: 'sync-marketplace-orders'
});

for (const evt of [
  'execution:finished',
  'execution:failed',
  'execution:missed',
  'execution:overlap',
  'execution:skipped'
]) {
  task.on(evt, (ctx) => {
    logger.info({ job: 'sync-marketplace-orders', event: evt }, 'cron event');
  });
}

Check the payload each event passes in the version of node-cron you have installed before relying on specific fields. What each event signals for a marketplace job:

  • failed: the work threw. Alert on repeats, not necessarily on a single failure if retries exist.
  • missed: the scheduler could not start a run on time, for example because the event loop was blocked.
  • overlap / skipped: a previous run was still going. For a payout or inventory job, this is a sign the job is slower than its interval.

Limit: these events come from the process that is doing the scheduling. They cannot tell you the process itself is gone.

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)

Control 2: Send the heartbeat only after useful work succeeds

The heartbeat is a request to a monitor URL. Place it after the marketplace work has succeeded. A ping at the start only proves the job was triggered, and can falsely imply completion. If failures must be visible, never let a failed run send the same success ping.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cron.schedule('*/15 * * * *', async () => {
  try {
    await syncMarketplaceOrders();        // the real work
  } catch (err) {
    logger.error({ err }, 'sync failed'); // no success ping
    return;
  }

  try {
    await fetch(process.env.MONITOR_PING_URL, {
      signal: AbortSignal.timeout(5000)
    });
  } catch (err) {
    logger.warn({ err }, 'heartbeat ping failed'); // job outcome unchanged
  }
}, { timezone: 'UTC' });

Note the two separate try blocks. A temporary network problem reaching the monitor should not rewrite the job’s own outcome, and a job error should not be hidden by the ping. If your monitor offers an explicit failure signal, use it from the catch branch so you get an immediate alert rather than waiting for the grace period to expire; otherwise, simply withholding the ping lets the absence trigger the alert.

Rank #3
ELECROW CrowPi Case Kit for Raspberry Pi 5, 9-Inch Display | Basic Kit with 9-Inch Display & Sensors for Learning and Programming, Raspberry Pi 5 Compatible
  • Not including the Raspberry Pi 5 (8GB), the Crowpi advanced version comes with the Raspberry Pi 5
  • ELECROW Black Case for the Raspberry Pi 5, CrowPi is equipped with a 9-inch HD touchscreen along with a camera; All the regular components used in DIY electronics are packed into the CrowPi development board, such as LCD, LED matrix, buzzer, light sensor, PIR sensor, ultrasonic sensor, IR sensor, etc
  • Raspberry Pi Sensors: The Crowpi raspberry pi 5 programming kit is jam-packed with lots of buttons such as 19 different sensors in a tidy easy to use package; You don't have to wait and wire things
  • Build Quality: Solid ABS shell and well made components in one place make it strong and convenient to travel
  • Programming Lessons: This raspberry pi 5 learning kit ships with step by step instructions and provides 21 lessons to take you through identifying components reading code and running it in the terminal

“Useful work” deserves a definition per job. Sending the ping after the API call returns, but before orders are persisted, is still too early. Put it after the last step whose failure you would care about.

Control 3: Monitor from outside the Node process

A separately hosted heartbeat monitor (Healthchecks and CronShield both document this pattern) waits for your expected check-in and alerts when it does not arrive. Because the monitor does not depend on your app, it still fires when the process has crashed, the container was never restarted, or the host is unreachable. That is the failure mode in-process events cannot see.

Rank #4
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
  • Fully assembled for plug-and-play operation
  • Includes Raspberry Pi 5 with 8GB RAM
  • 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
  • M.2 HAT+
  • CanaKit Turbine Black Case for the Pi 5

What it does not do: it confirms a signal was received, not that the marketplace data is right or every downstream effect (emails, payouts, webhooks) occurred. If correctness matters, make the job verify its own result, such as record counts or a reconciliation check, before it pings.

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

Handle the ping URL as a secret. The Healthchecks documentation warns against publishing the real ping URL; keep it in an environment variable or secrets manager, not in the repository.

Best Value
RasTech Raspberry Pi 5 8GB Kit with Active Cooler and Pi5 Case
  • 【What you Get】You will get 1*Pi 5 8GB Single Board,1*RasTech Case,1*Active Cooler,1*Screwdriver,1*Installation instructions,12-month free warranty, lifetime service, 24-hour prompt and friendly response.
  • 【More Connectors】There are two USB 3.0 ports(5Gbps simultaneously) and two USB 2.0 ports, which triple total bandwidth ,support any combination of up to two cameras or displays. Peak SD card performance is doubled through support for the SDR104 high-speed mode. It provides a smooth desktop experience for you. Offer Gigabit Ethernet and a PCIe interface, along with dual-band Wi-Fi and Bluetooth 5.0/BLE wireless capability. The RasTech Pi 5 Kit use the new 27W 5.1V 5A USB-C power connector.
  • 【 Support Dual 4Kp60 Display 】Each of the two microHDMI sockets can control a 4K display at 60 Hertz, now support HDR, offering super HD video for media streaming projects. RPi 5 is the first RPi model that comes with a PCI Express port (PCIe 2.0 x1 with 500 MB/s) to attach SSDs (requires separate M.2 HAT).
  • 【 Excellent Chips And Applications】Pi 5 is a full-size Pi computer using silicon built in-house at Pi. The RP1 “southbridge” provides the bulk of the I/O capabilities for Pi 5. Pi 5 is more friendly and convenient in the development of Internet of Things, Web development, machine identification, automatic control and other electronic equipment applications and network.
  • 【 Faster CPU, Better GPU 】 Pi 5 features a Broadcom BCM2712 64-bit quad-core Arm Cortex-A76 processor running at 2.4GHz, it delivers a 2–3× increase in CPU performance relative to RaspberryPi 4. The 800MHz VideoCore VII GPU is compatible to OpenGL ES 3.1 and Vulkan 1.2, substantial uplift in graphics performance. Pi 5 Offers lightning-fast CPU speed, a PCI Express interface, a Real Time Clock (RTC) and a power button and runs significantly cooler than Pi 4.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Control 4: Set the schedule and grace window deliberately

Heartbeat monitors are configured with the expected schedule (an interval or a cron expression) and a grace period before an alert is raised. The sources describe the mechanism but cannot give you values; those depend on your job. Gather these before setting them:

  • The real cadence in the cron expression, and the timezone it runs in.
  • Normal and worst-case completion time. The grace window should exceed ordinary runtime and delay, otherwise slow-but-healthy runs page you.
  • Retry behaviour: if a job retries three times, a single failed attempt should not alert.
  • Who is alerted, through which channel, and who acts.

Pin the timezone on both sides. The node-cron monitoring guidance notes that without an explicit timezone the server’s local time is used, so a host timezone change or daylight-saving shift can move your run away from what the monitor expects. Use timezone: 'UTC' or a named zone in the scheduler options and configure the monitor to match.

Control 5: Match the execution infrastructure to the reliability requirement

Heartbeats observe; they do not run, retry or deduplicate work. The monitoring guidance cited here recommends considering a durable queue or external scheduler when jobs must survive restarts or when you run several application instances. Decide based on three needs:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Restarts: must a run that was due during a deploy still happen afterwards? In-memory cron will not do this by itself.
  • Multiple instances: every instance that registers the schedule will run the task. Either designate a single scheduler instance, or add a coordination mechanism such as a lock, so a payout or relist job does not execute N times.
  • Idempotency: design the job so a repeated or retried run produces the same result. This is what makes retries and queue redelivery safe.

Even with a durable queue or external scheduler, keep the heartbeat on the final successful step, because queues and schedulers can fail too.

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
Bestseller No. 4
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
CanaKit Raspberry Pi 5 Desktop PC with SSD (Fully Assembled) (256 GB SSD)
Fully assembled for plug-and-play operation; Includes Raspberry Pi 5 with 8GB RAM; 256 GB PCIe Pi NVMe SSD (Pre-loaded with Pi 64-Bit OS)
$339.97

Which failures each layer catches

Failure Scheduler events External heartbeat
Job throws an error Yes (execution:failed) Yes, via missing success ping (or explicit failure signal if supported)
Run delayed or missed by the scheduler Yes (execution:missed) Yes, after the grace period
Run overlaps the previous one Yes (execution:overlap, execution:skipped) Only indirectly
Process or host down No Yes
Task never registered at startup No Yes
Wrong data written by a “successful” run No No; add in-job verification

Rollout checklist

  1. List each recurring marketplace job with its cadence, timezone and typical duration.
  2. Create one monitor per job, not one shared monitor, so an alert names the job that failed.
  3. Set each monitor’s schedule and a grace period above normal runtime.
  4. Store the ping URL in secrets management.
  5. Move the ping to after the last meaningful step, with separate error handling.
  6. Subscribe to scheduler events and log them with the job name.
  7. Test it: stop the process, or make the job throw, and confirm the alert reaches the right person.
  8. If you run multiple instances or need run-after-restart behaviour, move to a queue or external scheduler and keep the heartbeat.

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 monitoringheartbeat monitoringnode-cronnodejsreliabilityscheduled jobs

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.