Hi Steve,
You are correct that the database would become large overtime if the auto-deleting logs over time option is disabled.
The plugin uses the built in WP function for the cron intervals. You can add your own easily by adding this little snippet into your themes functions.php file:
add_filter('cron_schedules', function($schedules) {
$schedules['three_months'] = array(
'interval' => 7890000,
'display' => __('Every 3 months')
);
return $schedules;
}
It’ll then appear as an option in the settings screen
Also see here: https://developer.wordpress.org/reference/functions/wp_get_schedules/
-
This reply was modified 5 years, 2 months ago by
JWardee. Reason: Added extra detail
Thread Starter
Steve
(@puddesign)
Hi I just tried this but I’m getting
syntax error, unexpected end of file, expecting ‘)’
Hi Steve,
There was a typo in the original code snippet. It needed an additional ); at the end. If you need any other tweaks I’d recommend grabbing a freelance developer – hope this helps!
add_filter('cron_schedules', function($schedules) {
$schedules['three_months'] = array(
'interval' => 7890000,
'display' => __('Every 3 months')
);
return $schedules;
});