site1.erralert.com

← Heartbeats & check-ins

Batch / Cmd heartbeat batch

One-line heartbeat from cmd.exe — useful when you cannot enable PowerShell script execution. Calls powershell.exe inline to POST.

Placeholders only. Before running, replace YOUR_URL with your capture endpoint's POST URL . (Open this page from your capture object to have these auto-filled.)
@echo off
REM heartbeat.cmd — site1.erralert.com check-in from cmd.exe (no script-exec policy needed)
powershell.exe -NoProfile -Command "try { Invoke-RestMethod -Uri 'YOUR_URL/heartbeat' -Method Post -Body (@{hostname=$env:COMPUTERNAME} | ConvertTo-Json -Compress) -ContentType 'application/json' -TimeoutSec 15 | Out-Null; exit 0 } catch { exit 1 }"

Recommended pairing

Add a capture.freshness check to this capture object.
max_silence_seconds = your-schedule-interval x 2.

What is the filename?

heartbeat.cmd — this is the suggested name for the downloaded file. Rename freely if you prefer.