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
Hi Tobias,
what do you mean with “changing the PHP code of the TablePress Extension” exactly?
Regards,
Max
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
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
Hi,
yes, that’s the code that I meant. 🙂
Regards,
Tobias
Hi,
no problem, always happy to help!
Regards,
Tobias