Discount Sale
  • Days
  • Hrs
  • Mins
  • Secs
30% Off

Use coupon code 'MDS30' Limited Offer!!

Star

Home > Docs > Product Import Export Plugin for WooCommerce > Running WordPress Cron Job When Site Activity is Less

Running WordPress Cron Job When Site Activity is Less

Last updated on May 16, 2025

Setting up a cron job when site activity is low is crucial to ensure smooth performance and avoid disruptions for users. During high-traffic periods, running resource-heavy tasks like product imports or exports can slow down the site, affect loading times, or even cause errors. By scheduling cron jobs during off-peak hours—when fewer visitors are browsing or making purchases—you minimize the impact on user experience, reduce server load, and ensure the task completes more efficiently and reliably.

If you are working with a WordPress cron job, you must understand it is not a guaranteed timing mechanism. Wp-cron fires based on site activity. If you have a job set to fire every ten minutes, but nobody visits your site for an hour, then the job doesn’t fire for an hour. To avoid this type of unnecessary timeouts, We can either use server cron or resolve the issue using the following methods:

  • Via wp-config.php
  • Via cPanel
  • Third-party Cron Job Set-Up

Method 1: Via wp-config.php

If you have a lesser number of visits per day and you are using wp-cron to do some scheduled tasks, you can add below line in your wp-config.php to fire Cron.

define('ALTERNATE_WP_CRON', true);

This method uses a redirection approach, which makes the user’s browser get a redirect when the cron needs to run so that they come back to the site immediately while cron continues to run in the connection they just dropped.

Method 2: Via cPanel

You can set Cron Job with help of your hosting providers cPanel tool as shown below:

Set up Cron cPanel

Alternate options – Third-party cron job set-up

If you find WordPress Cron is not efficient enough, there are 3rd Party options available that will take care of setting up a Cron job as per your business case. EasyCron is one of the easiest options available.