Skip to content

Start the machine-health scheduled run in a plugin profile #16542

Description

@kyle-sexton

Goal

The machine-health scheduled run can start in a plugin profile. #16523 wired the other launch sites to profiles.mjs launch and left this one out. Part of #16428.

Why it was left out

From #16523's body (re-read the cited lines before building):

  • The scheduled run's command line is built in templates/monthly-run.ps1 (lines 43 and 59) under Task Scheduler, whose /tr value is capped at 262 characters.
  • The argv profiles.mjs launch prints starts with env, which Windows lacks.

Proposed shape (the build session's, not yet a decision)

Install-MonthlyRun takes an -Argv value and writes <StateBase>/scheduler/launch.json, which the wrapper reads, so the scheduled task's own command line stays short.

Done when

  • A machine-health scheduled run can be set up to start in a named profile on Windows, the one platform the audit and its scheduler route run on today.
  • The wrapper's profile path is not Windows-only: it runs on Linux or macOS too, shown by a test there. No scheduler route is added for those platforms.
  • With no profile named it runs as it does today.
  • The marker variables are cleared on Windows without env.
  • Tests cover both paths.

Scope note, 2026-11-16 (hub session "Plugin Presets", which filed this item): the first line read "on Windows and on Linux or macOS". The audit is Windows-only (skills/audit/reference/linux/not-implemented.md, macos/not-implemented.md) and setup has no scheduler route elsewhere, so the line is split into the two above.

Activity

  1. added
    host-run
    on Nov 16, 2026
  2. added
    needs-triage
    on Nov 16, 2026
  3. github-actions commented on Nov 16, 2026

    @github-actions
    Contributor

    Size: Medium
    Complexity: Medium
    Uncertainty: Knowable
    Flags: none
    Blocked by: none

    Understood: let the machine-health scheduled run start in a named plugin profile on Windows (Task Scheduler) and on Linux or macOS. The /tr length cap and the missing env on Windows are the constraints. With no profile named, the run stays as it is today. The marker variables must be cleared without env, and tests must cover both paths.

    The done-when items are exact. The proposed launch.json shape is an implementation choice that leaves the design unchanged, so I am recommending it rather than asking: the wrapper reads the argv from a file, which keeps the scheduled task's command line short. Re-read the cited lines in templates/monthly-run.ps1 before building, as the issue says.

    Related, not duplicates: #16541 (same profile launch for fleet reach or relay sessions) and #16428 (the parent). No merged pull request in the recent list fixes this.

    Automated triage. A maintainer reviews it.

  4. removed
    needs-triage
    on Nov 16, 2026
  5. melodic-automation-lanes commented on Nov 16, 2026

    @melodic-automation-lanes
    Contributor

    Not admitted to the issue lane: it carries host-run. Admission takes the issue once each of those is met, when intake triages it again (.github/actions/resolve-config/admission-rules.json).

  6. removed
    host-run
    on Nov 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    Work status

    confirmed

    Priority

    medium

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions