Do multiple jobs on date change without WordPress cron job

Another way to repeat a task regularly – but not on every page refresh – without using cron is to use a transient that lasts for a day. It will even help your website display its homepage faster!!

A transient is a wordpress way to cache bits of html. It is especially useful for complex requests to the database. With transient, you do the complex requests, then store the html output in the database for a given amount of time. So you could run your function, store its output and have it cached for X amounts of seconds (a day = 24*60*60 seconds = 86400).

Here is a (reduced) example of what you should run on your front-page.php template.

// Get any existing copy of our transient data
if ( false === ( $special_query_results = get_transient( 'frontpage_random_posts' ) ) ) {
    // It wasn't there, so regenerate the data and save the transient
     $special_query_results = new WP_Query( 'cat=5&order=random&limit=1&orderby=date' );
     set_transient( 'frontpage_random_posts', $special_query_results, 86400 );
}

// Use the data like you would have normally...

More info: http://wp.tutsplus.com/tutorials/getting-started-with-the-wordpress-transients-api-part-1/