Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: Repair tool with cron

@dralawady

Participant

@robin-w: I guess my problem is in adding the event to the cron. The function I’m trying to run is bbp_admin_repair_freshness and it’s declared in tools.php file, however there is no hook attached to it. I tried the this snippet code but it didn’t work:

if ( ! wp_next_scheduled( 'bbp_sync_forum_topics_activity' ) ) {
	wp_schedule_event( time(), 'hourly', 'bbp_sync_forum_topics_activity' );
}

add_action( 'bbp_sync_forum_topics_activity', 'bbp_admin_repair_freshness' );
Skip to toolbar