action-scheduler icon indicating copy to clipboard operation
action-scheduler copied to clipboard

Option to ignore some groups when using the wp-cli command

Open georgejipa opened this issue 4 years ago • 3 comments
trafficstars

Hello,

It would be nice to have an option to ignore some groups when using the wp-cli command.

For example:

  1. run actions from cache group: wp action-scheduler run --group=cache
  2. run actions from all groups, except cache: wp action-scheduler run --group=-cache or maybe wp action-scheduler run --ignore-group=cache

What do you think?

georgejipa avatar Jul 26 '21 07:07 georgejipa

I definitely see the utility of that—thanks for the suggestion.

  • I'm tending to think a new flag like --ignore-group might be best (vs using a new -group_name syntax with the existing --group flag), but what are your own thoughts on that?
  • Do you see a need to support passing multiple group names, and do you have any preference as to how that would look (such as --ignore-group=foo,bar,baz or something else)?
  • If we agree on how this should look and behave, are you also interested in crafting a PR for this (or would you rather leave that to the team)?

barryhughes avatar Jul 26 '21 22:07 barryhughes

Hello,

I'm tending to think a new flag like --ignore-group might be best (vs using a new -group_name syntax with the existing --group flag), but what are your own thoughts on that?

I like both options, but a new flag (like --ignore-group) would be much more intuitive.

Do you see a need to support passing multiple group names, and do you have any preference as to how that would look (such as --ignore-group=foo,bar,baz or something else)?

Yes, I think --ignore-group=foo,bar,baz would be great.

If we agree on how this should look and behave, are you also interested in crafting a PR for this (or would you rather leave that to the team)?

I would rather leave it to the team, but I might give it a try in a month or two if the team is too busy. :)

georgejipa avatar Jul 28 '21 05:07 georgejipa

Great, thanks @georgejipa.

barryhughes avatar Jul 28 '21 18:07 barryhughes