I recall reading a short story a number of years ago where two brothers were each given extremely detailed (and sometimes rather tedious) instructions that they had to follow very precisely in order to get their inheritance. One of the brothers ended up having to spend a lot of the night in this tower, periodically going to the top at very exact times in order to get his next set of instructions and then returning to the bottom of the tower. I don't recall the exact details of the other brother's instructions, but he had to go all over town in order to accomplish all of them.
One brother just barely finished his entire set of instructions on time, having only a few minutes to spare.
The story may have been written by O. Henry, but I'm not sure.
Can anyone help me identify what story this is?