Or, embed this snippet using GenerateWP WordPress Plugin.

Download

Clone

Cron Job – 10mins

Email list every 10mins

// Scheduled Action Hook
function send_mail( ) {
	return wp_mail( '[email protected]', 'Notification TEST', 'TEST', null );
}
add_action( 'send_mail', 'send_mail' );

// Custom Cron Recurrences
function custom_cron_job_recurrence( $schedules ) {
	$schedules['10 min interval'] = array(
		'display' => __( 'Frequency - 10', 'textdomain' ),
		'interval' => 600,
	);
	return $schedules;
}
add_filter( 'cron_schedules', 'custom_cron_job_recurrence' );

// Schedule Cron Job Event
function custom_cron_job() {
	if ( ! wp_next_scheduled( 'send_mail' ) ) {
		wp_schedule_event( current_time( 'timestamp' ), '10 min interval', 'send_mail' );
	}
}
add_action( 'wp', 'custom_cron_job' );