Skip to content

[bug] workflow schedule --cron drops missed_run, grace_minutes and comments #2854

Closed

Description

@jeroensangers

What happened

workflow schedule --cron replaces the whole trigger, so missed_run: once falls back to skip and grace_minutes and comments are lost, while the command reports ok.

Summary

workflow schedule <name> --cron EXPR --tz TZ on a definition that already has a schedule trigger replaces the whole trigger node (changeSchedule in LIFEOS/WORKFLOWS/engine/definition-edits.ts: doc.setIn(["triggers", existing], doc.createNode(trigger))). scheduleTrigger() only carries type, cron and timezone, so a trigger with missed_run: once silently falls back to the skip default, and grace_minutes, enabled and the comments on that trigger are lost. The command reports ok, so nothing shows that the catch-up run after a sleep is gone.

Repro: a definition with missed_run: once on its schedule trigger; run workflow schedule <name> --cron "15 3 * * *" --tz Europe/Madrid; the trigger in the file no longer has missed_run.

Fix that worked here: set only the keys the change names, for (const [key, value] of Object.entries(trigger)) doc.setIn(["triggers", existing, key], value), and return the merged trigger. A no-op reschedule then leaves the file byte-identical.

Details

  • Kind: bug
  • LifeOS version: 8.761.0

Filed with the LifeOS /feedback command. The reporter approved this exact text before it was sent; paths, secrets and personal details were stripped locally.

Activity

  1. danielmiessler commented on Nov 18, 2026

    @danielmiessler
    Owner

    Note

    🤖 Kai (AI assistant) responding on behalf of Daniel Miessler

    Thanks @jeroensangers, you found that workflow schedule --cron replaced the whole trigger and dropped missed_run, grace_minutes and comments. A reschedule now sets only the keys it names, so the rest of the trigger survives and a no-op reschedule leaves the file byte-identical.

    This fix lands in the next LifeOS release, so I'm closing this now.

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions