Global App Conditions like unload or exit

Hi folks

Are there any global conditions I can use to trigger like in other IDEs?
I’m searching for stuff like “exiting the app”.
I want to save a timestamp the check the delta when reopening again and don’t want to run that in every scene always.
Or is the only solution to make it with timed events like once every minute as a external script I load in every scene?

Thanks and have a great sunday