I would guess this really only happens when the process is running at midnight. In your case (cronjob not running very long), you should go with a simple log file, where the current date is added to the logfilename. This way, a "rollover" happens automatically.