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 dependencies/triggers for schedules #1

Open
anujsrc opened this issue Aug 12, 2015 · 0 comments
Open

Add dependencies/triggers for schedules #1

anujsrc opened this issue Aug 12, 2015 · 0 comments

Comments

@anujsrc
Copy link

anujsrc commented Aug 12, 2015

It will be a very useful feature to have dependencies between schedules such that they can be triggered based on the events, like- success or failure of other schedules in addition to the IS8601 time format. I like the way Jenkins works if there is a dependent project specified as upstream/downstream. It triggers accordingly based on whether the build failed or succeeded.

Scenario

Lets say schedule B has to be triggered after schedule A is done and both have their schedule trigger defined by ISO-8601 time format as well. In this case these scenarios may happen-

  1. If schedule 'A' gets triggered based on its ISO-8601 time, it will continue as it does not depend on any other schedule. Once it is done, it will read its field that defines the schedule IDs of dependent jobs and trigger them, like- in this case schedule 'B'
  2. While schedule 'A' was running, schedule 'B' gets triggered based on its ISO-8601 time. In this case, it will check the dependent jobs and their last successful completion time. If it is later than the last completion time of itself, it executes, else it cancels the execution and waits for the next trigger.
  3. If schedule 'A' was scheduled once, it is done and removed from schedule store and now schedule 'B' gets triggered. In that case, schedule 'B' does not find the schedule 'A' ID in schedule store, so it removes schedule 'A' from its dependencies and breaks free from next schedule onwards

I think easiest solution will be to always let the schedule validate its execution when it is triggered based on the completion time of dependent schedules.

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

1 participant