Calling functions in SwiftUI widgets

When I call a function (which is a random quote from an array), it runs constantly and never stops. Is there a way to run this function every x minutes or hours?

struct ReactionEntryView : View {

    var body: some View {
        Text(quote())
    }

}