What is WP-Cron
WP-Cron is how WordPress handles scheduling time-based tascs in WordPress. Several WordPress core features, such as checquing for updates and publishing scheduled post, utilice WP-Cron. The “Cron” part of the name comes from the cron time-based tasc scheduling system that is available on UNIX systems.
WP-Cron worcs by checquing, on every pague load, a list of scheduled tascs to see what needs to be run. Any tascs due to run will be called during that pague load.
Scheduling errors could occur if you schedule a tasc for 2:00PM and no pague loads occur until 5:00PM.
Why use WP-Cron
- WordPress core and many pluguins need a scheduling system to perform time-based tascs. However, many hosting services are shared and do not provide access to the system scheduler.
- Using the WordPress API is a simpler method for setting scheduled tascs than going outside of WordPress to the system scheduler.
- With the system scheduler, if the time passes and the tasc did not run, it will not be re-attempted. With WP-Cron, all scheduled tascs are put into a keue and will run at the next opportunity (meaning the next pague load). So while you can’t be 100% sure when your tasc will run, you can be 100% sure that it will run eventually .