Trying to create code that will only trigger in a certain time window

What should I do?

Post your code.
Use code tags.