Music Loop

My server is bugging out tick.json for no aparent reason we don't know why it works in single player so I have to do it another way bare in mind it needs to be stopped so a recursive function won't work either. I am using a recursive function but as a clock instead of to play the music.
Continue to help post