PHP Timeout Help

Ok I have a script which accesses an external source database and inserts its data into my own. When i run it on cron job I think the script just finishes but as it gets bigger it has now started timing out.
Is there anyway to make it not time out?
Ive tryed putting sleep() into the function to delay it before it grabs another record but it still timesout?

Please post anthing relevant and help
Thanks in Advanced