Skip to content

virus_scan cron job failed every run from Apr 12 → May 17, 2026 with:

Scan failed: Windows Defender (MpCmdRun.exe) not found

Mar 29, 2026 refactor (5e38d23) moved virus_scan.py into the package and updated the crontab from uv.exe run virus_scan (Windows Python) to uv run virus_scan (Linux Python). The path constants in get_defender_path() were not updated — they used Windows backslash paths (C:\Program Files\...) which Linux Python cannot resolve.

src/my_backup/virus_scan.pyget_defender_path() updated to use WSL paths:

  • C:\Program Files\Windows Defender\MpCmdRun.exe/mnt/c/Program Files/Windows Defender/MpCmdRun.exe
  • C:\ProgramData\Microsoft\Windows Defender\Platform\*\MpCmdRun.exe/mnt/c/ProgramData/... (with X86 exclusion)

Verified: path resolves correctly in WSL. MpCmdRun.exe still executes on Windows via WSL interop.

  • Kept WSL-path fix (Option A) — minimal change, preserves Windows execution via interop
  • All scheduled tasks remain in WSL cron (not Task Scheduler) — Talbot’s preference
  • Signature updates expected to work via WSL interop (Admin identity); confirmed on May 24 cron run

New task created: cron-job-monitor.md — implement healthchecks.io (Option A chosen) to alert on any cron job failure across WSL + cloud services.