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

Better Workflow scheduling options #8292

Open
pgorod opened this issue Nov 22, 2019 · 2 comments
Open

Better Workflow scheduling options #8292

pgorod opened this issue Nov 22, 2019 · 2 comments
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Type:Suggestion Issue containing a suggestion of functionality, process or UI. Associated PRs are called enhancement

Comments

@pgorod
Copy link
Contributor

pgorod commented Nov 22, 2019

Issue

This is a suggestion for a feature which comes form this discussion #3806, I think it shouldn't get lost as I often see requests for similar things in the Forums, and I believe this is relatively easy to implement.

The problem

Workflows job is typically executed once per minute. If you want to do something only once per hour, day, month, etc., you have to play with some field to store whether it has run already in the current period or not; and have a condition break the execution if it has. This is inefficient in terms of performance, and cumbersome and confusing to set up.

You can also just set up a custom scheduler job in PHP, but this is a show-stopper for users who are not programmers and want to stick to the Workflows UI.

The proposed solution

I have a suggestion for a design to solve this same problem, with a generic solution, and I believe it isn't too much work to develop:

  • in Workflows, add option Run as Only From Specific Scheduler Job

image

  • in Schedulers, add an option in Add Scheduler called Run Specific Workflow with parameter letting you choose existing Only from Specific Scheduler Job Workflows from Dropdown

image

  • in general workflow execution, ignore these Workflows when launched from the generic Scheduler job, and run them when run from the specific one

This way the full possibilities of crontab settings could be applied to any specific Workflow.

Note that we already have a Process AOW Wokflow Scheduler job, but it runs all the Workflows, not a specific one.

@Mac-Rae Mac-Rae added Type:Suggestion Issue containing a suggestion of functionality, process or UI. Associated PRs are called enhancement Area: Workflow Issues & PRs related to all things regarding workflow labels Nov 22, 2019
@pgorod
Copy link
Contributor Author

pgorod commented Nov 22, 2019

A slightly easier to make UI, although not as good, would be to just dump all the Workflows into the existing Job dropdown.

So in that version, there wouldn't be a second dropdown for the specific job selection, you would just add all existing Workflows in the job dropdown, after the others, with a Workflow: prefix, like this:

Job Dropdown: 
URL
Refresh Jobs
Check inbound Email accounts
(... all the other currently existing jobs ...)
Workflow: my daily task
Workflow: birthday reminder
Workflow: create weekly meetings

@turtlemenace
Copy link

This would be a powerful feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Workflow Issues & PRs related to all things regarding workflow Type:Suggestion Issue containing a suggestion of functionality, process or UI. Associated PRs are called enhancement
Projects
None yet
Development

No branches or pull requests

3 participants