Files
daily-robots/send-wecom.ps1
2026-07-02 11:31:16 +08:00

18 lines
384 B
PowerShell

# Push daily report to WeCom group webhook
param(
[string]$ReportPath
)
$ErrorActionPreference = "Stop"
$Root = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $Root
$python = "python"
$args = @("-m", "daily", "push")
if ($ReportPath) { $args += $ReportPath }
& $python @args
if ($LASTEXITCODE -ne 0) {
throw "daily push failed with exit code $LASTEXITCODE"
}