Code:
//timer 5 1 echo -a $[color:red]![/color]rand(1,9) 


The ! makes it re-evaluate the $rand everytime the timer triggers.