Programmatically adding posts

add_action( 'publish_post', 'run_when_post_published_first_time',10,2 );
function run_when_post_published_first_time($post_id, $post)
{
// Checks whether is post updated or published at first time.
if ($post->post_date != $post->post_modified) return;

// Place here your code
}

from http://wordpress.org/support/topic/new-post-hook