Run function at certain moment, SwiftUI

Hello
Is there a way to execute a function (even if the app is closed) at a certain time, for example 12:30 AM?
Run function at certain moment, SwiftUI
 
 
Q