Setting the Server Side Cron (Linux Cron)
The Server Side Cron option if one of 3 options in the Advanced settings of MailPoet to trigger the Task Scheduler. This ensures your emails are sent quickly and on time without delay.
The Server Side Cron option is ideal if you have:
- Sending issues;
- Issues with high CPU usage on hosts like Siteground;
- any other form of sending issues, for example your site is behind a firewall.
You can set it up in under 5 minutes even if it appears quite technical! MailPoet's support team or your host should be able to help you if necessary.
What is the Cron Option?
A “Linux Cron” is a server side script that runs frequently to trigger any task of your choice.
In this case, we are using it to trigger the MailPoet Task Scheduler every minute to make sure MailPoet sends regularly.
Setting The Cron
1. Go to your wp-admin > MailPoet > Settings. Click the “Advanced” tab.
2. Toggle the server side cron (Linux cron option).
3. With that enabled, you’ll see a new box which is the cron job you need to set on your server. That’ll look like this;
Now you have the cron URL you need to set it’s time to set it up on your host.
There are a few ways to set up a cron, and this depends both on your level of experience and the type of hosting you have.
Setting Your Cron Job
Method 1: Using cPanel
This is the most common method of setting a cron job and involves setting the cron job directly within the control panel of your hosting. Most hosts use “cPanel.” Including popular hosts such as Siteground and Bluehost.
There are detailed guides from a number of hosts including;
Of course, there are any more hosts than what is covered above, but the process when you access the cPanel of your hosting provider is the same.
Method 2: Using crontab
Crontab is for more advanced users and those with SSH access to their server. Most shared and managed hosting environments do not provide this level of access.
For more information on setting up a cron job using crontab read this excellent article created by Linode.
Why would I need to use this option?
- More control over how often the task is run.
- Stamps out high CPU usage issues on hosts like Siteground.
- Does not run a constant background process that some hosts don’t allow.
- More reliable than using “visitors to your site” as it will run at the interval set regardless of visitors.