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

one-shot + finished support #21

Merged
merged 2 commits into from
Jun 19, 2024
Merged

one-shot + finished support #21

merged 2 commits into from
Jun 19, 2024

Conversation

boucadair
Copy link
Collaborator

No description provided.

@boucadair boucadair requested a review from QiufangMa June 14, 2024 13:32
"Indicates a one-shot schedule. That's a schedule that
will trigger an action and then the schedule will disable
itself.";
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the difference between one-shot and period? One-shot starts at a specific instant time without indicating the duration/end?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is no periodicity/recurrence at all in a one-shot schedule. We need to this type to ease mapping with the MIB in RFC 3231

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, I don't know the existence of RFC 3231 before, thanks for the info. While I found RFC 3231 defines three types of schedules that cannot be directly mapped to ours according to the naming rules:

  1. Periodic schedules, defined by specifying the number of seconds between two initiations, I understand this as a recurrence rule like every 4 seconds to trigger the action. This is very different from the period-of-time grouping we have defined, which describes a specific duration of time; but instead kind of a recurrence definition.
  2. Calendar Schedules, trigger scheduled actions at specified days of the week and days of the month. similar to our recurrence related definition, no issues.
  3. One-shot Schedules, automatically disable itself once an action has been invoked, this is actually the one I feel like similar to period-of-time.

IMO it is confusing to have both this one-shot identity and the period (different from periodic) as schedule-types, though the only difference might be, by specifying one-shot, the users are not allowed to provide the duration/end time of the trigger. but it is not mandatory to specify duration/period-end in the period-of-time grouping.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main difference I see between a one-shot and period of time is that the end time is not required to be configured but determined by the action. The end will be a read-only while this can be configured for a period.

Copy link
Collaborator

@QiufangMa QiufangMa Jun 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with that, could the difference be stated in the description? e.g.,
description for one-shot identity:
"Indicates a one-shot schedule. That's a schedule that
will trigger an action without the duration/end time being
specified and then the schedule will disable itself.";

description for period identity:
"Indicates a period-based schedule consisting either a
start and end or a start and positive duration of time.";

Just want to make sure there is no overlap between two identities.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough. Done.

@boucadair boucadair merged commit b96d272 into main Jun 19, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants