A Cozmoslabs Product

Cron Jobs

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.

Problems With Low Traffic Sites

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.

Problems With High Traffic Sites

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.

­How to Manage the Cron-job

There 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.

Cron in Paid Member Subscriptions

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:

Process recurring payments

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

Setting the status of subscriptions to Expired

The status of Subscriptions is set to Expired using a daily cron job: pms_check_subscription_status

Setting the status of payments to Failed

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

Sending Email Reminders

Configured Email Reminders are sent through an hourly and daily cron job: pms_send_email_reminders_hourly and pms_send_email_reminders_daily

The Ultimate Membership Bundle

Combine the power of Profile Builder with Paid Member Subscriptions to set up user registration, memberships, and recurring revenue.

Get 25% off with the bundle

Help & Support

We’re here to help you every step of the way.

Open a Support Ticket