Create a trigger. Set it to repeatedly.
Condition: alarmOn
Effects: the alarm, obviously
When the variable alarmOn is true, the alarm will sound. When it is false, it will not. Use anything you like - probably other triggers - to switch the variable from true to false and hence the sound on and off.
But I like Wildebeest's way. ;D