How to make a system event application in c#?
===

I am trying to make the following. I have a class that at midmight it makes a log from what happened in a SQL table and makes an excel file of it. My issue is that I was told that it is inexcusable to have this application running all day only to have it run once a day and that I should do this with a system event, but I have no idea how to do this. Help, please?