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

Add functionality to pause/resume schedules #14

Open
deepakpathania-zz opened this issue Oct 8, 2019 · 0 comments
Open

Add functionality to pause/resume schedules #14

deepakpathania-zz opened this issue Oct 8, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@deepakpathania-zz
Copy link
Owner

Since schedules are picked up based on nextRunningTime, a schedule can be considered paused for a cycle by simply updating their nextRunningTime to their next cycle's time.

For example, if a schedule was supposed to run every hour and the next invocation time is 1PM, if we update it to 2PM, it will not be picked up in the 1PM cycle and can be considered pasued for that duration.

Expose an endpoint that pauses the schedule based on this method for a given number of cycles.

Structure

  • POST /v1/schedules/{{identifier}}/pause
{
  "cycles": <int>
}

Similarly, expose an endpoint to resume a paused schedule. Resuming in this context would mean, simply calculating the nextRunningTime based on their original period and setting that as the new nextRunningTime for the schedule.

Structure

  • POST /v1/schedules/{{identifier}}/resume
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant