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?
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
* * * * * curl https://example.com/wp-json/woofunnels/v1/worker
- * * * * * - 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 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.
Step 2: Enable logs creation for debugging
Go to Settings of FunnelKit Automations.
Under Advanced, enable the logs.
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.
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.
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.