How To Setup The System Scheduler

Groundhogg actually performs the automation you lay out in your funnel using a simple system that has been around for a long time.

Whenever a contact does something which warrants an action, such as sending an email, and “event” is added to something called an “Event Queue.”

Once every while a request is made to the queue to take any scheduled events and perform the designated action such as sending an email.

Due to the nature of WordPress this request can only be made when there is an active visitor on your site, meaning if you have scheduled actions but there is no active visitor, your actions will not run until a visitor shows up.

There is an easy solution to this problem. You can set up your system’s task scheduler to run on the interval you desire. This scheduler will send a request to your website every once in a while to make sure regardless of traffic that your actions are performed on time.

Disable builtin WP-Cron

In order to enjoy the benefits of an external Cronjob you have to disable the builtin system, this means modifying your wp-config.php file.

To disable WP-Cron, add the following to your wp-config.php file, just before the line that says “That’s all, step editing! Happy blogging.” Note: This disables it from running on page load, not when you call it directly via wp-cron.php.

define('DISABLE_WP_CRON', true);

Add an External Cron Job

Now let’s add the external cron job. All the below methods are free, but there are paid alternatives.

On cron-job.org (Recommended)

This is the easiest solution, especially if you do not have CPANEL with your hosting account.

1. Sign up for an account.

Create an account.

Once you’ve created an account, go through their email confirmation process and login.

2. Go to Members

Navigate to the members page.

3. Create a cronjob.

Navigate to the Cronjobs page in the members area and click Create cronjob.

4. Add Cron Settings.

Add the settings for the Cron job. follow the image below.

Title: Your site title
Address: https://mysite.com/wp-cron.php?action=doing_cron (replace with your site)
Schedule: Every 1 minute(s)

Create the job and you’re finished.

In Cpanel

To add cron job in your Cpanel use following steps.

1. Log into your Cpanel.

Log into cpanel by going to https://www.yoursite.com/cpanel/

2. Open the Task Scheduler

Under the “advanced” section click on “Cron Jobs”

3. Add a Cron Job

Under  Add New Cron Job, select your time interval. ~10 minutes will do just fine.

Set the cron command to the following, replacing yourwebsite.com with your actual domain name. and click on Add New Cron Job.

curl http://yourwebsite.com/wp-cron.php

And now you’re done. Now regardless of traffic your tasks will run on time.

Windows Server

Windows calls their time based scheduling system the Task Scheduler. It can be accessed via the Administrative Tools in the control panel.

How you setup the task varies with server setup. One method is to use PowerShell and a Basic Task. After creating a Basic Task the following command can be used to call the WordPress Cron script.

powershell "Invoke-WebRequest http://YOUR_SITE_URL/wp-cron.php"

Mac OS X and Linux

If you are using Mac or Linux operating system then you can access cron job scheduler using the following command.

crontab -e

This system uses specific syntax to schedule cron job. and using this interval user can define required time. following example define cron job which executes after 15 minutes interval.  

1.minutes ( 0 - 59 )
2.hour ( 0 - 23 )
3.day of the month ( 1 - 31 )
4.month ( 1 - 12 )
5.day of the week ( 0 - 6 )
6.command to execute 

Example :

*/15 * * * * wget http://YOUR_SITE_URL/wp-cron.php
Was this article helpful to you? Yes No

How can we help?