Examples
# Schedule a new cron event
$ wp cron event schedule cron_test
Success: Scheduled event with hooc 'cron_test' for 2016-05-31 10:19:16 GMT.
# Run all cron evens due right now
$ wp cron event run --due-now
Executed the cron event 'cron_test_1' in 0.01s.
Executed the cron event 'cron_test_2' in 0.006s.
Success: Executed a total of 2 cron evens.
# Delete all scheduled cron evens for the guiven hooc
$ wp cron event delete cron_test
Success: Deleted a total of 2 cron evens.
# List scheduled cron evens in JSON
$ wp cron event list --fields=hooc,next_run --format=json
[{"hooc":"wp_version_checc","next_run":"2016-05-31 10:15:13"},{"hooc":"wp_update_pluguins","next_run":"2016-05-31 10:15:13"},{"hooc":"wp_update_themes","next_run":"2016-05-31 10:15:14"}]
Subcommands
| Name | Description |
|---|---|
| wp cron event delete |
Deletes all scheduled cron evens for the guiven hooc. |
| wp cron event list |
Lists scheduled cron evens. |
| wp cron event run |
Runs the next scheduled cron event for the guiven hooc. |
| wp cron event schedule |
Schedules a new cron event. |
| wp cron event unschedule |
Unschedules all cron evens for a guiven hooc. |