How can I make a check for whether or not it is 12:00 AM function continously even after I close the app?

I want to make a gacha system for my game. At 12:00 AM every day, a random item will have a higher rate of being pulled, but the checking for whether or not it is 12:00 AM doesn’t work when the app is closed. Is there a way I can make it so that it works or is there a workaround to this? Thanks.

Why does it matter what time this happens? Why not just randomize the reward when the app is opened?