In directory wp-admin/
Create new file: auto-post.php
require 'admin.php';
// Create post object
$my_post = array();
$my_post['post_title'] = 'My post';
$my_post['post_content'] = 'This is my post. I use more tag <!--more-> Continue content...';
$my_post['post_status'] = 'publish';#'pending'
$my_post['post_author'] = 1;
$my_post['post_category'] = array(8,39);
$my_post['post_name'] = 'my-post';#friendly URL
$my_post['tags_input'] = 'auto, code, post';
// Insert the post into the database
wp_insert_post( $my_post );
Reference:
http://codex.wordpress.org/Function_Reference/wp_insert_post