These commands require an always active repeating command block to make them always active. The best way to put this in a map is underground at the world spawn, since world spawn always keeps those chunks rendered. These are also separate commands, so they might have to to be pasted into a word document and then you can cherry pick.