OK...Almost a complete re-write, and while it doesn't work the way you wanted, as in starting and stopping the timer at certain times, this does work and has been tested for several times.
on me:*:join:#:{
.timermsg 0 10 tmsg $chan
}
alias tmsg {
if $time > 19:34:00 || $time < 04:00:00 {
.msg $1 hello
}
}
on *:disconnect:{
.timermsg off
}