Creating an Alarm

I’m trying to create a simple alarm that flashes a notification 5 min after a page gets created from a template. I only want it to go off once.

Is there a way to do this in Lua? Some sort of thread.sleep or wait?

I think this could be feasible by storing the creation date and some sort of “is alarm” flag in the frontmatter (which can be set in the template’s frontmatter) and then writing a hook on the second passed event to query for “is alarm” pages whose creation date is within a second of exactly 5 minutes (or perhaps “at least 5 minutes” and then remove the “is alarm” flag).