wp cron event

Manage WP-Cron events.

GitHub Issues

EXAMPLES

# Schedule a new cron event
$ wp cron event schedule cron_test
Success: Scheduled event with hook 'cron_test' for 2016-05-31 10:19:16 GMT.

# Run all cron events due right now
$ wp cron event run --due-now
Success: Executed a total of 2 cron events.

# Delete the next scheduled cron event
$ wp cron event delete cron_test
Success: Deleted 2 instances of the cron event 'cron_test'.

# List scheduled cron events in JSON
$ wp cron event list --fields=hook,next_run --format=json
[{"hook":"wp_version_check","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_plugins","next_run":"2016-05-31 10:15:13"},{"hook":"wp_update_themes","next_run":"2016-05-31 10:15:14"}]

SUBCOMMANDS

Name Description
wp cron event delete

Delete the next scheduled cron event for the given hook.

wp cron event list

List scheduled cron events.

wp cron event run

Run the next scheduled cron event for the given hook.

wp cron event schedule

Schedule a new cron event.

Command documentation is regenerated at every release. To add or update an example, please submit a pull request against the corresponding part of the codebase.