Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding a schedule with the same name as an existing schedule will 'NOT' replace the existing one #78

Open
sundeer opened this issue May 17, 2024 · 1 comment

Comments

@sundeer
Copy link

sundeer commented May 17, 2024

If I inject this payload, a schedule is created that fires once at 2am and then deactivates. I thought, based on the docs, that I could inject that same payload again and it would replace the existing one of the same name. However, the existing schedule still remains deactivated and does not fire again. Am I misunderstanding or is this suppose to behave as I expected.

Here's the section of the docs I'm referring to:
GENERAL NOTES... Adding a schedule with the same name as an existing schedule will replace the existing one

{
    "command": "add",
    "name": "someName",
    "expression": "0 0 2 * * ? *",
    "expressionType": "cron",
    "payloadType": "default",
    "limit": 1
}
@Steve-Mcl
Copy link
Owner

This might be a quirk of the limit feature.

Until I get time to look into this, you could force it with remove command into the mix e.g.

[
  {
    "command": "remove",
    "name": "someName"
  },
  {
    "command": "add",
    "name": "someName",
    "expression": "0 0 2 * * ? *",
    "expressionType": "cron",
    "payloadType": "default",
    "limit": 1
  }
]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants