Skip to content

Delete multiple events at once - #81

Closed
Mike-Hermans wants to merge 7338 commits into
wp-cli:masterfrom
Mike-Hermans:39-add-all-flag-to-delete
Closed

Delete multiple events at once#81
Mike-Hermans wants to merge 7338 commits into
wp-cli:masterfrom
Mike-Hermans:39-add-all-flag-to-delete

Conversation

@Mike-Hermans

@Mike-Hermans Mike-Hermans commented Jun 2, 2022

Copy link
Copy Markdown
Contributor

Fixes #39 by making the command more consistent with the wp cron event run command.

It is now possible to delete multiple cron events at once by either:

  • Specifying multiple hooks that need to be deleted:
$ wp cron event delete wp_version_check wp_update_plugins
  • Delete all cron events that are due now
$ wp cron event delete --due-now
  • Delete all cron events at once
$ wp cron event delete --all

Since the selection process of the run and delete command is now the same, a separate function has been added to filter the required hooks (::get_selected_cron_events()).

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:cron Related to 'cron' command command:cron-event-delete Related to 'cron event delete' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Suggestion, add a --all flag to wp cron delete
Sponsor
SponsoredKunjungi sekarang
Promo