Table of Contents
WP-Cron is how WordPress handles scheduling time-based tasks in WordPress. Several WordPress core features, such as checking for updates and publishing scheduled posts, utilize WP-Cron. The “Cron” part of the name comes from the cron time-based task scheduling system that is available on UNIX systems.
The major difference between Cron and WP-Cron is how WP-Cron is triggered. Cron is a system process that runs every minute and looks for tasks to execute. WP-Cron, because it is a web-based system, can only run when someone visits the site.
Low traffic WordPress sites may experience skipped tasks when this feature is triggered by visitors. If people aren’t visiting your site, WP-Cron can’t execute. This doesn’t mean your page will be slow from previous jobs when someone eventually does visit your site. Regardless of how many tasks WP-Cron has to execute, they are run in the background so your site’s performance is not adversely affected.
If your WordPress-powered site is high traffic, you may run into problems with WP-Cron. The main issues that come up are race conditions and long-running processes.
set_time_limit()
function. If this is set to be longer than the window between tasks, then you can end up with more than one copy of wp-cron.php executingThere are two types of cron jobs: one that runs on the website level and one that runs on the server level. The best way to solve the problems discussed above for high traffic and low traffic sites is to configure the cron job to work on the server level. In order to do that you need to contact your hosting provider and ask them if they can configure the cron job to work on the server level for your website.
Paid Member Subscriptions also make use of Cron in order to perform certain actions. The plugin works with the built-in WP-Cron and with the WordPress cron configured at the server level. The most relevant events we use are listed below:
Recurring payments that are done through the Stripe or PayPal Express with Reference Transactions enabled gateways are processed by the plugin using a daily cron job: pms_cron_process_member_subscriptions_payments
The status of Subscriptions is set to Expired using a daily cron job: pms_check_subscription_status
Pending payments are the result of some payment gateways which don’t offer instant payment verification. Pending payments which will never complete are set to Failed using a daily cron job: pms_cron_process_pending_payments
Configured Email Reminders are sent through an hourly and daily cron job: pms_send_email_reminders_hourly
and pms_send_email_reminders_daily
Accept (recurring) payments, create subscription plans and restrict content on your website. Easily setup a WordPress membership site using Paid Member Subscriptions.
Get Paid Member SubscriptionsCombine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.
Get 25% off with the bundle