Here is the documentation for CreateLuaEvent:
local function TimedFunction(eventId, delay, repeats)
CreateLuaEvent(TimedFunction, 30*60*1000, 0)
CreateLuaEvent(function, delay, calls) - Creates a global timed event. Returns Event ID. Calls set to 0 calls infinitely.
Also look into WorldObject:RegisterEvent(function, delay, calls)
It works exactly the same way except it passes the world object and only runs if the world object is in world (player near it)
Also see the RemoveEventById and RemoveEvents
ps. the delay is in milliseconds so I just made some math there to convert 30 min to milliseconds