You have many options for that... the simplest would be using AutoHotKey with a script like this one:
Code:
Init:
DetectHiddenWindows , On
ControlSend , ahk_parent, {F12}, World ahk_class GxWindowClass
;ControlSend , ahk_parent, {F12}, ahk_pid 3988
DetectHiddenWindows , Off
Sleep 120000 ;
Goto, Init
f9::Pause
f10::ExitApp
Or you could use the feature in my bot (EWT). You attach to WoW then go to the Extra Tab. There, on the right, you will be able to set an interval and the key you want to send to the game.