Best WordPress hook to import external posts

I've been developing with WordPress for a while now, but I'm working on my first custom function which I intend to make into a plugin.

I have an external source of posts in XML format that I want to bring into my site.

My function will read in the posts, determine which ones should be added, and programmatically add the posts to my site.

What I'm wondering is how I should hook this function into my site. I only want it to run when WordPress admin loads (no need to have this extra overhead when the public side of the site loads). I hope I am correct in that what I am looking for is a "hook" to attach my function to, correct?

What are my best options for this function?

Thank you!
Brad BansnerWeb DeveloperAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Jason C. LevineDon't talk to me.Commented:

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Brad BansnerWeb DeveloperAuthor Commented:
Thank, man.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.