Running a regular/timed script?

Are there any suggestions / accepted methods for having a script do something periodically? For example, start some kind of timer in the OnInit which can run 'in the background'.

Thanks!
T

A script dialog can use timers, but I can't think of an easy way otherwise.