Use timer, check this page, the example section has what you need, watch out for timer injection though.

https://en.wikichip.org/wiki/mirc/commands/timer


#mircscripting @ irc.swiftirc.net == the best mIRC help channel