take a peek at this thread and see if it's what you need
https://forums.mirc.com/ubbthreads.php/topics/260747/Scheduled_Message_(to_run_a_co#Post260747