you can make a scoreboard score like load and control for an event or a player or something similar
I'm using "/execute unless score Loader load matches 0 run schedule function zero1237:scheduled 0.5s"
In scheduled function file you must be sure (if you want to create a loop) you add "schedule function zero1237:scheduled 0.5s" at the end and you must be sure you make Loader's load score 0 in that file [The best place is ending part of file]
[The commands I wrote are working every half second from start and you can make some changes for events with execute command like scores or tag. It's all up to you]