• Resolved malaga16

    (@malaga16)


    Could you help me why is this cron running every 5 sec? It seems to be irreal low time.

    If it is a bug, how can I moderate this? Example 5minutes?

    wt_productfeed_cron_interval

    This schedule is added by another plugin and cannot be deleted5 (5 seconds)
     This interval is less than the WP_CRON_LOCK_TIMEOUT constant which is set to 60 seconds. Events that use it may not run on time.Every 5 second

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @malaga16,

    Thank you for reaching out to us.

    The reason the cron interval is set to 5 seconds is to speed up the cron batch process. However, if you’d prefer to adjust the interval, you can modify the schedule using the code snippet below. This code snippet will change the interval to 1 minute.

    You can copy the code snippet below and paste it into your active theme’s functions.php file, or you can use the Code Snippets plugin to add it for you.

    add_filter('wt_productfeed_cron_interval_details', 'wt_productfeed_cron_schedules', 10, 1);

    function wt_productfeed_cron_schedules($schedules) {

    $schedules['wt_productfeed_cron_interval'] = array(
    'interval' => (60),
    'display' => __('Every 1 minute', 'webtoffee-product-feed'),
    );
    return $schedules;
    }
    Thread Starter malaga16

    (@malaga16)

    Thanks for the quick response.
    Can we get a little more information to understand how it works? What does “speed up the cron batch process” mean?
    It goes through each product one by one and that’s why it takes 5sec? So if I set it to 60sec it could take up to a day for the entire process to run?

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @malaga16 ,

    Let’s say you have set the feed to process in batches of 15. In this case, the cron batch will process 15 products per execution. If you have 150 products, it will take 10 batches to complete the entire process. Based on the code snippet provided earlier, each batch will be triggered once per minute, so the full process will take approximately 10 minutes to complete.

    Thread Starter malaga16

    (@malaga16)

    Thank you very much for explanation. Now I understand everything!

    Plugin Support WebToffee Support

    (@webtoffeesupport)

    Hi @malaga16,

    We’re glad we could assist you with your inquiry. If you like the plugin and support, please leave us a review here. It would really help us spread the word. Thanks in advance!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘wt_productfeed_cron_interval – 5sec is irreal’ is closed to new replies.