Spelunking in version 8,
Internal`AddPeriodical[Print["boo!"], 3]
Now you get a boo!
every 3 seconds.
Internal`Periodicals[]
(* ==> Print["boo!"] *)
Now do
Internal`RemovePeriodical[Print["boo!"]]
to stop it.
Internal`Periodicals[]
(* ==> {} *)
Note that AddPeriodical
and RemovePeriodical
have HoldFirst
.
I don't know what Internal`$ThisPeriodical
is, but I suspect it might have a special value during the execution of a periodical (no time to spelunk more, sorry!)