I was just about to do something similar.
What needs to happen is a seperate thread needs to be kicked off from the Global.asax.
void Application_Start(object sender, EventArgs e)
{
// Code that runs on application startup
}
You will also need to account that the application pool will recycle many times, so make sure it is based on a specific time and that you also have a Database that stores whether it has run or not incase the app pool recycles over the 3am mark, which is highly likely.
You will also need to have some form of keep alive service as if your website goes inactive the app pool won't restart until someone hits it.