Here's what you do, on connect, start a timer that activates at 4pm, that timer should set a variable active and start another timer that activates at 5pm, unsetting the variable.
/help on connect
/help timers
Then when that is done you just check in your text events if the variable is active or not.