How to Auto Publish nodes based on set interval?
The Rules module is your friend. But if that's too much overhead and you don't need the flexibility, I would suggest coding it on your own.

Also see this question for executing rules on cron.