Skip to content

feat(pm): Windows Task Scheduler adapter — cron-policy processes compile to Scheduled Tasks [PM-C] #844

Description

@rickylabs

Part of #510.

A third OS backend beside systemd/Servy: Windows Scheduled Tasks for PM processes whose start
policy is cron — periodic/triggered workloads register with the OS scheduler instead of running
as resident services (no idle footprint on consumer/prosumer machines; survives reboot; OS owns
the trigger).

Fits the ratified PM architecture with no new concepts:

  • PM-19 compile mapping: autostart/watch policy → Servy service (shipped adapter); cron
    policy → Scheduled Task (new renderer + adapter, schtasks.exe-backed).
  • PM-17 capability descriptor: the task backend advertises {triggers, runAs, non-resident};
    warn-and-omit for knobs it can't honor (e.g. WatchdogSec-class).
  • PM-18 seam: the windows target's ServiceDeployTargetPorts grows the task sibling.

Upstream trajectory (wrap, don't block): denoland/deno#33965 scaffolds Deno.cron.persistent
(register with crontab/launchd/schtasks; CF-Workers-style default.scheduled worker entry) —
currently API-only, all backends "not yet supported", behind --unstable-cron; per-OS backends
land in follow-up PRs. v1 wraps schtasks.exe directly (the Servy doctrine); when upstream
backends ship, adopt Deno.cron.persistent as the first-party registration path and align the
worker-entry shape.

  • gate: render + register/unregister round-trip against real schtasks (Windows runner)
  • gate: capability descriptor accurate; warn-and-omit tested; PM-19 compile mapping test
  • gate: reboot survival — task fires after restart without any resident NetScript process

Depends on: PM-17 #528, PM-19 #530. Design source: PR #822 (rfc.md) + run .llm/runs/rfc-single-deployment--orchestrator/.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:deployDeployment: CLI/Aspire deploy, targets, bare-metalarea:pluginsplugins/* and plugin-core packagesepic:process-managerProcess manager plugin epic (bare-metal supervisor + admin console, child of #327)priority:p2Mediumstatus:planHarness plan phasetype:featwave:v1

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions