example42 / tinydata

Tiny Data for Tiny Puppet & C.
7 stars 12 forks source link

Monitor GitHub Runner Process on Windows 10 #73

Open marlon-git opened 1 year ago

marlon-git commented 1 year ago

Monitor GitHub Runner Process on Windows 10

Wondering if is possible to use Tiny Puppet to monitor the GitHub Runner process on Windows 10. The process name is Runner.Listener.

Currently using the powershell bellow on a Schedule Task that run every 5 minutes:

$Runner = (Get-Process -Name Runner.Listener -ErrorAction SilentlyContinue -ErrorVariable ProcessError)

if($Runner -eq $null)
{
   Write-host "GH Runner is not running" -ForegroundColor Red
   .\Cleanup-Runners.ps1
   Restart-Computer -ComputerName .
}
else
{
   Write-host "GH Runner is running" -ForegroundColor Green
}

Context

alvagante commented 1 year ago

Currently the tp command line is not supported on Windows, and the command itself is used buy the relevant tp::test task. Sorry.