Cron job to call php to email last 24 hours posts

In your functions.php you can use this. You will have to activate your theme again for it to take effect. You only want to schedule a cron job on activation, not on activation NOT on every page load, which is what the functions.php does, it loads on every page load.

This would be betterused in a plugin.

register_activation_hook(__FILE__, 'cron_job_activation_hook');

function cron_job_activation_hook() {
wp_schedule_event( time(), 'daily', 'ron_posts_emails');
}

add_action('ron_posts_emails', 'ron_send_daily_posts_email');

function ron_send_daily_posts_email() {
$args = array(
'numberposts' => 10,     
'orderby' => 'post_date',  
'order' => 'DESC',       
'post_type' => 'reservations',    
'post_status' => 'draft, publish, future, pending, private',    
'suppress_filters' => true );    
$recent_posts = wp_get_recent_posts( $args, $output = ARRAY_A );

//mail stuff hurr

}