FluentCRM depends on CRON jobs to automate the background processes like sending emails, processing automation funnel actions. We use background jobs to make your WordPress frontend fast so it does not affect your site speed.
WordPress default cron is not reliable and it depends on your site traffic. It’s always better to use server side CRON handler.
We can easily tell WordPress to let us handle the execution of wp-cron.php with the wp-config.php file.
Add the following like to your wp-config.php. It will disable built-in cron of your WordPress
Now you have just disabled default wp-cron now, based on your hosting you can setup real cron. Here we are showing for several. Please select and configure based on your hosting:
Please follow this section if your hosting provider offer Cpanel.
Login to your hosting CPANEL and then search for CRON
Click on Cron Jobs and create a new one
Select Once Every Minute from Common Settings
Then in command add the following command
wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
Please replace https://yourdomain.com/ with your site URL. after that click “Add New Cron Job” and you that’s done. Now, Your WordPress Cron jobs will be independent of WordPress’s default handler. That’s all for CPANEL configuration.
If you know your php path and wp-cron.php path you can add the following code in the Command instead of wget solution
If you use a VPS and have SSH access then this section is for you.
Login to your server by SSH
Then run the following command:
This system uses specific syntax to schedule Cron Job.
Use the following example to define a Cron Job which executes every minute.
Add the following line:
* * * * * wget -q -O - https://yourdomain.com/wp-cron.php?doing_wp_cron >/dev/null 2>&1
* Please replace yourdomain.com with your own domain.
You can also use alternative method by directly executing the wp-cron.php file
* * * * * /usr/bin/php /path/to/wp/wp-cron.php > /dev/null 2>&1
* Please replace /path/to/wp/wp-cron.php with right path and make sure your php path is also correct.
That’s it. No need to read the next section if you use a VPS.
Go to Application Management > Cron Job Management > Add New Cron Job
In the next screen add the location path of the wp-cron.php file and how often you want to run it, my example runs it every 30 mins.
(By setting the cron job up with the Basic tab in Cloudways, the task is automatically run by PHP, whereas in cPanel you need to explicitly add the PHP path. If you swap to the Advanced tab in Cloudways you’ll see the PHP path in full)
You can also use external services to run your cron job. In this example we are using cron-job.org
Create an account
Create an Account with cron-job.org.
Setup the cron job
After verify your email, login and go to Members -> Cronjobs -> Create Cron Job and setup like the screenshot
* Please replace youtsite.com with your correct domainname
If your server does not match any of it then you can search in google by your hosting company name and cron or contact with your hosting providers.
Would be great to get a tutorial for adding a cron handler on RunCloud too!
Thanks for sharing this awesome guide. I have replicated the settings for Cloudways and it’s working. I’m trying to figure out how to do this on Bunnyshell, as I have several websites hosted on this platform. I’ll share the settings here once I’ve figured it out.
Your email address will not be published. Required fields are marked *
Save my name, email, and website in this browser for the next time I comment.