site1.erralert.com

← Scheduled task setup

Windows Task Scheduler XML — 5-minute heartbeat xml

Drop-in Task Scheduler XML that runs heartbeat.ps1 every 5 minutes from SYSTEM, even when no user is logged in. Import via `schtasks /create /tn 'AlertsHeartbeat' /xml heartbeat-task.xml`.

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.)
<?xml version="1.0" encoding="UTF-16"?>
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task">
  <RegistrationInfo>
    <Description>site1.erralert.com heartbeat — runs heartbeat.ps1 every 5 minutes.</Description>
    <Author>site1.erralert.com</Author>
  </RegistrationInfo>
  <Triggers>
    <CalendarTrigger>
      <StartBoundary>2026-01-01T00:00:00</StartBoundary>
      <Repetition>
        <Interval>PT5M</Interval>
      </Repetition>
      <ScheduleByDay>
        <DaysInterval>1</DaysInterval>
      </ScheduleByDay>
    </CalendarTrigger>
  </Triggers>
  <Principals>
    <Principal id="Author">
      <UserId>S-1-5-18</UserId>
      <RunLevel>HighestAvailable</RunLevel>
    </Principal>
  </Principals>
  <Settings>
    <MultipleInstancesPolicy>IgnoreNew</MultipleInstancesPolicy>
    <DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries>
    <StopIfGoingOnBatteries>false</StopIfGoingOnBatteries>
    <AllowHardTerminate>true</AllowHardTerminate>
    <StartWhenAvailable>true</StartWhenAvailable>
    <Enabled>true</Enabled>
    <Hidden>false</Hidden>
    <ExecutionTimeLimit>PT2M</ExecutionTimeLimit>
    <Priority>7</Priority>
  </Settings>
  <Actions Context="Author">
    <Exec>
      <Command>powershell.exe</Command>
      <Arguments>-NoProfile -ExecutionPolicy Bypass -File "C:\Scripts\heartbeat.ps1"</Arguments>
    </Exec>
  </Actions>
</Task>

Recommended pairing

Add a capture.freshness check to this capture object.
Pair with the PowerShell heartbeat script and a 10-minute max_silence (gives one full schedule miss before alerting).

What is the filename?

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