Last Updated on June 23, 2023 by Mike Kipruto
What is WP-Cron?
WP-Cron is how WordPress handles scheduling time-based tasks in WordPress.
WP-Cron is used by a number of core WordPress features, including checking for updates and publishing scheduled posts.
Using the WordPress Command Line Interface (WP-CLI)
WP-CLI is the command-line interface for WordPress. Without using a web browser, you can update plugins, configure multisite installations, and much more.
In order to use the WP-CLI and you are on an operating system like Linux or Mac, you can use the built-in SSH terminal. In contrast, Windows users can use PuTTYto access the server.
We make use of the wp cron <command>
in order to test, run, and delete WP-Cron events; manages WP-Cron schedules.
Examples of WP CRON
Commands
1. wp cron test
This command is used to test the WP Cron spawning system as shown:
2. wp cron event <command>
This command is used to schedule, run, and delete WP-Cron events as shown:
For more details, on the same, please take a look at the official WP-Cli handbook on the same here.
3. wp cron schedule <command>
This command is used to get the WP-Cron schedules as shown:
Leave a Reply