param([string]$TaskName = "HMH Executive Summary Refresh")

Write-Host "Checking scheduled task:" $TaskName
schtasks /Query /TN "$TaskName" /V /FO LIST
Write-Host ""
Write-Host "Latest refresh log:"
$log = "C:\xampp\htdocs\ddb-new\storage\logs\executive-summary-refresh-latest.log"
if (Test-Path $log) {
  Get-Content $log -Tail 80
} else {
  Write-Host "No log yet:" $log
}
