How to switch from WordPress cron to Server-based cron
Get more reliable scheduling, and take a load off of your WordPress front end, by switching WordPress cron mode to server-based cron. Here’s how:
- Disable the default WordPress cron mode. You can achieve this by opening up your wp-config.php file (in your root WordPress install directory), and add the following line before the line which says: “/* That’s all, stop editing! Happy blogging. */”:
- Save wp-config.php and check your install still runs (always good to check!)
- Create a cron rule in your hosting control panel to fire the WordPress cron reliably. This step will be different for different hosting providers, but here we include ‘how to’ for cPanel, because that covers the majority of our user base. The steps will be very similar though for all other hosts (See below for guide).
- Go to Jetpack CRM -> Settings -> Mail Campaigns
- Switch Cron Mode to ‘Use Server cron‘ and hit save.
Creating a cron rule for WordPress (cPanel):
- Load your cPanel and type ‘cron’ in the search box to find the ‘Cron Jobs’ settings page (and click ‘Cron Jobs’)
- Enter a new cron job as follows (notes below):
wget -q -O – http://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
*Don’t forget to replace ‘yourdomain.com’ with your WordPress install host here.
Note: Here we’ve set this to run every minute. This is the recommended setting for reliable email sending via Jetpack CRM Mail Campaigns, Task scheduler, etc. You can set this to every 5 minutes if you are worried about server performance (e.g. on a very restrictive hosting plan), but overall 1 minute intervals are recommended.