Make a tone sketch

hello all

I need to produce a sound for an alarm system.I was looking for a tone library but I havent seend you can I stop the tone then.
The tone starts but never ends.
I had also try to put a delay but nothing happens.
Can some one just post me a code of a sketch with just a simple tone 1200Hz repiting every 2 seconds.

noTone()
Description

Stops the generation of a square wave triggered by tone(). Has no effect if no tone is being generated.