Make App Run in Background

I have created an alarm app for my school bells. However, the sounds only work when the app is the active window. Any way to make it work in the background?


I have found myself facing a similar problem before. in fact, the window doesn’t have to be active, it just doesn’t have to be minimized.
but there have been several updates since then, it may have changed something.

Yeah, I had a preview running. The time didn’t change to reflect the system time until I clicked on the window to make it the active one. Then it immediately changed and the alarm sounded.