Skip to content

[Feature Request] Add patch to schedule command #939

@LarsAlmgren

Description

@LarsAlmgren

Is your feature request related to a problem? Please describe.

I noticed that when updating a scheduled workflow with the cli, if I don't provide exactly all input it will be overwritten (empty). This is fine I guess as it's how update usually behaves. I would however like to have a patch command for schedules so I don't need to provide everything again.

Describe the solution you'd like

When I do temporal schedule patch --schedule_id abc I want the command to keep the schedule exactly the same, except for the arguments I pass.

Given the following schedule

Schedule ID: abc
Input: "hello"
Schedule spec:
[
  {
    "interval": "360s",
    "phase": "0s"
  }
]

Performing the following executions on the given schedule:
Example 1
temporal schedule patch --schedule_id abc --input 'goodbye'

Schedule ID: abc
Input: "goodbye"
Schedule spec:
[
  {
    "interval": "360s",
    "phase": "0s"
  }
]

Example 2
temporal schedule patch --schedule_id abc --interval 1m would leave the input intact

Schedule ID: abc
Input: "hello"
Schedule spec:
[
  {
    "interval": "60s",
    "phase": "0s"
  }
]

Example 3
This example is using --headers which are only available on the version built from source.
temporal schedule patch --schedule_id abc --headers 'MyHeader={"Key":123}' would leave both

Schedule ID: abc
Input: "hello"
Schedule spec:
[
  {
    "interval": "360s",
    "phase": "0s"
  }
]
Headers: MyHeader={"Key": 123}

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions