• Resolved maxraudive

    (@maxraudive)


    Hi Tobias,
    Is it possible to define the time intervals yourself? There are tables, which should be loaded with less than 15minuten delay. So maybe with 5 minutes?

    Regrads,
    Max

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Max,

    this might be possible, but I’m not completely sure. From what I remember, WordPress employs a 15 minute lower limit (to reduce server load), but you could try by changing the PHP code of the TablePress Extension.

    For such low intervals, I also recommend to set the WP_POST_REVISIONS to a smaller number, see https://codex.ww.wp.xz.cn/Revisions#Revision_Options
    Otherwise, the database could grow in size very fast.

    Regards,
    Tobias

    Thread Starter maxraudive

    (@maxraudive)

    Hi Tobias,

    what do you mean with “changing the PHP code of the TablePress Extension” exactly?

    Regards,
    Max

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi Max,

    inside the tablepress-table-auto-update.php file, there is a function cron_add_quarterhourly() that adds the 15 minute interval.
    You could simply modify that to use 5 minutes, or you copy it as a second function for 5 minutes (which then has to be integrated with a corresponding call like

    add_filter( 'cron_schedules', array( __CLASS__, 'cron_add_quarterhourly' ) );
    

    a little bit higher in that code.

    Regards,
    Tobias

    Thread Starter maxraudive

    (@maxraudive)

    Hi Tobias,

    is this this point in the php-file:

    public static function cron_add_quarterhourly( $schedules ) {
    // Adds once every 15 minutes to the existing schedules.
    $schedules[‘quarterhourly’] = array(
    ‘interval’ => 15 * MINUTE_IN_SECONDS,
    ‘display’ => ‘Once every 15 minutes’,
    );
    return $schedules;
    }

    *************************************************************************
    …must this turn in:

    *************************************************************************
    public static function cron_add_quarterhourly( $schedules ) {
    // Adds once every 15 minutes to the existing schedules.
    $schedules[‘quarterhourly’] = array(
    ‘interval’ => 5 * MINUTE_IN_SECONDS,
    ‘display’ => ‘Once every 5 minutes’,
    );
    return $schedules;
    }

    Thanks & Regrads,
    Max

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    yes, that’s the code that I meant. 🙂

    Regards,
    Tobias

    Thread Starter maxraudive

    (@maxraudive)

    Hi Tobias,

    thank you for support!

    Regrads,
    Max

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    no problem, always happy to help!

    Regards,
    Tobias

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

The topic ‘Automatic Periodic Table Import <15min?’ is closed to new replies.