OK, I can't really imagine a scenario where you would actually want to click a button at this time, but they are your requirements. There are actually three parts to consider with this question, so I'll cover them one at a time.
- When you click a button, you are only calling a method, therefore you don't actually need to worry about the button side - simply call a method containing the logic that your button would be triggering anyway.
- The code that runs this should reside on a background thread. In an application that I once wrote that had to wait for a specified time interval, I spawned a background thread - the background thread then calculated the time difference between 11PM and the current time (you might have to do some day manipulation to get the right day to base your calculation on). Then, it simply used a Monitor to wait for that time interval - if the application was being closed, the Monitor was pulsed to wake it up so that it could die gracefully.
- The code isn't guaranteed to run at 11PM. It will run as close as it can get to it, but there is no way to guarantee that your code will actually be executed at this time.