FunnelKit Documentation
Get unstuck with our helpful reference material

FunnelKit Automations

WP-CRON

If you are running FunnelKit Automations (formerly Autonami) on your website, we advise you to set up the CRON system.

CRON makes sure that all the tasks smoothly run on your website every minute.

In simple words, think of CRON as a clock that ticks every minute. And to make a clock tick, you need a battery.

Now that battery could be inside the WordPress or outside on the server. Having it on the server offloads the work from WordPress.

You can request your host and they would easily oblige as they also understand the benefits of performance enhancements.

Why CRON is Important?

FunnelKit Automations depends on CRON to timely execute different tasks every minute.

It’s essential for the CRON worker to run every minute to take care of all the processes such as scheduling, task creation and data synchronization.

Without the CRON, you’ll face a considerable delay in running profitable campaigns and automations in FunnelKit Automations.

You’ll notice some lag in capturing abandoned cart data, sending bulk emails, or performing bulk actions, etc.

Therefore, setting up Cron lets you run different tasks asynchronously to eliminate the possibility of slowing down requests on your website.

Will Setting Up CRON Slow Down My Site?

No, it won't slow down your website.

An HTTP single call is like when someone opens up your site homepage, roughly 100+ requests go to your server.

So, it's a single HTTP request. If there is anything to run, then it will run it, or else it won't and will terminate the process.

It doesn't consume any time.

How to Set Up CRON from the Server?

You can set up the cron at the server level through CPANEL or directly on the server.

However, we recommend you ask your host to have CRON set up on the server and not on WordPress to avoid putting unnecessary load on your website.

Here's the exact command to set up the cron for FunnelKit Automation:

* * * * * curl https://[site-domain-here]/wp-json/woofunnels/v1/worker

For example,

* * * * * curl https://example.com/wp-json/woofunnels/v1/worker

Meanings

  • * * * * * - This executes the job every minute
  • curl - Command that helps in the execution
  • https://example.com/wp-json/woofunnels/v1/worker  - This is the URL of your site that needs to get hit

Once you have set up the CRON, you’ll be good to go.

How to Set Up CRON Using an External Service?

Sometimes, your hosting server may not run CRON properly. That’s why it’s good to have a backup. 

We recommend using “Cron-job.org” - you can create a free account and set up.

Once you’ve registered or logged-in to your account, follow these steps to set up CRON.

Step 1: Create a CRON job

Click on the “CREATE CRONJOB” button.

Enter the title and Worker URL.

Step 2: Configure the CRON job execution schedule

Configure the execution schedule to every 1 minute.

Let’s run it for only 5 minutes.

For that, set the schedule expires and set the time.

Once done, click on ‘Create’.

Clicking on create will execute the CRON.

This is how you can set up CRON using an external service.

How to Check if the Cron is Working Properly?

There are 3 steps to check if the CRON is working properly.

Step 1: Add a snippet

To check if CRON is getting hit every minute or not, paste this code into the snippet on WordPress:

<?php
/**
* Add in wp-config.php or in theme functions.php file.
* This will log the timings of worker and will get the info at what frequency FunnelKit Automations worker is running.
*/
define( 'BWF_CHECK_CRON_SCHEDULE', true );

Once you have pasted the snippet, click on Save Changes and Activate.

Add the snippet

Step 2: Enable logs creation for debugging

Go to Settings of FunnelKit Automations.

Under Advanced, enable the logs.

Enable logs creation for debugging

Click on Save Settings when done.

Step 3: Check the CRON logs

After you have enabled logging, wait for 3-4 minutes.

Next, refresh the page and check the logs under the file name cron-check-[today’s date] from the Logs tab.

Check the CRON logs

If the cron is working fine, it’d automatically create a log file on its first auto-hit.

Select the file from the dropdown and click on View.

Click on View to see the CRON logs on your WordPress website

As you can see, the CRON is getting hit every minute, which means that it’s working properly on your website.

If you don’t see any logs under this name, just copy the CRON URL and hit it in the browser. After that, refresh the logs page and you may be able to see the generated file.

Since this file was generated after manually hitting the CRON URL, it means that the CRON wasn’t working on the site, hence the file was not generated.

In any case, it’s always best to set up the cron at the server level. We recommend you contact your service provider to set up the CRON URL on the server.

Increase your sales, starting today.

Grab Our Exclusive Bundle
chevron-down