Setup CRON job where I can use SugarCRM framework

Hello,

I need to create a script that runs every day, grabs emails from inbox, parses these, and if it finds the info needed, duplicates some entries in SugarCRM, sets some fields etc.

I need to use the SugarCRM framework, code like:

$account = new Account();

$account->retrieve($invoice->billing_account_id);

What's the preffered way to include SugarCRM into cron script?

Thanks!