You can thread a function containing a for(;;) loop and a wait statement.
timedMessage() {
level endon("game_ended");
for(;;) {
allClientsPrint("This is a message printed to all players.");
wait 45;
}
}
Call the function like level thread timedMessage(); in init().