Here is a simple script that I use to test my WordPress scripts without needing to display the blog.

This example will load the WP engine, plugins, and display the current (virtual) cron jobs.

PHP Code:
require_once( 'wp-load.php' );

//ini_set('display_errors',1); // Uncomment these 2 lines to get verbose error reporting

$crons _get_cron_array();

In the above example I was checking to see if my auto-posts were scheduled to be pinged. When I discovered that they were not, I created this function:

PHP Code:
function my_ping($post_id) {
"Before ping.\n";
    if (
== (int) get_option('blog_public')) return;