I have made a WordPress cron job that should send out a mail each hour:
function mail_cron_job() { $time = date( \'h:ia\', time() ); wp_mail( \'****@
you need to use an action hook to tie the event and function together.
add_action( 'mail_cron_job', 'mail_cron_job' );
You can add that right after the function.