Reply To: How To Change POP3 Cron Time


Home Forums Front End PM PRO How To Change POP3 Cron Time Reply To: How To Change POP3 Cron Time

#25592
shamim
Keymaster

Add following code in your theme’s (child theme’s if you are using) functions.php and keep there.

add_filter( 'cron_schedules', function( $schedules ){
	$schedules['every_minute'] = array(
		'interval' => MINUTE_IN_SECONDS,
		'display'  => __('Every Minute', 'front-end-pm'),
	);
	return $schedules;
});

Then add following code in your theme’s (child theme’s if you are using) functions.php. Then refresh your website couple of times then remove following code.

add_action( 'init', function(){
	if ( wp_next_scheduled( 'fep_pop3_event' ) ) {
		wp_clear_scheduled_hook( 'fep_pop3_event' );
	}
	wp_schedule_event( time(), 'every_minute', 'fep_pop3_event' );
});