I have a cron job which runs every 30 minutes to generate log files with time-stamp like this:
test20130215100531.log, test20130215102031.log
You should use logrotate! It can do this for you already, and you can just write to the same log file.
Check their man pages for info: http://linuxcommand.org/man_pages/logrotate8.html