Sometime I’m experiencing wordpress to not reschedule the jobs on wordpress update. I’m patching all my plugin to add a check like yours, which is correct. Only this code is needed:
if (wp_next_scheduled(‘mailer_send’) == 0) {
wp_clear_scheduled_hook(‘mailer_send’);
wp_schedule_event(time() + 900, ‘mailer’, ‘mailer_send’);
}
and you can surround it with an “is_admin()” to avoid to check the scheduler every blog visit.