• Resolved msrm

    (@msrm)


    Hi,

    I have tried using the code here – https://docs.wprssaggregator.com/add-a-custom-cron-interval/ and amended it as follows to create a 3 hour interval:

    add_filter( ‘cron_schedules’, ‘cron_add_3h’ );

    function cron_add_3h( $schedules ) {
    $schedules[‘3 hours’] = array(
    ‘interval’ => 10800, // 60sec*60min*3hours
    ‘display’ => __( ‘3 hours’ )
    );
    return $schedules;
    }

    However, it’s not appearing as an option in my settings.

    Have I done something wrong?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi @msrm,

    Could you please let us know the following information:

    1. Where did you put that filter on your site?
    2. Have you checked your individual Feed Source setting? Since the custom interval will be added to this and not to the general setting
    Thread Starter msrm

    (@msrm)

    Hi,

    1. I placed it in Tools > Shortcodes, Actions and Filters plugin and checked the Activate checkbox.

    2. Yes, I have tried adding a new as well as editing an existing feed source but it doesn’t appear as an option.

    Hi @msrm

    It would seem that the filter needs to be placed on your theme/child theme’s functions.php

    Somehow when we placed that filter on Tools > Shortcodes, Actions and Filters, it didn’t work for us either.

    Could you please check and confirm ?

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

The topic ‘Adding a custom cron interval’ is closed to new replies.