block / particle animations only at night

So! This is my first question here. On an oil rig in my map there are flashing lights, which are controlled by the datapack and are only supposed to toggle at night. I have already created the predicate, which works: > { > "condition": "minecraft:time_check", > "value": { > "min": 0, > "max": 12000 > }, > "period": 24000 > } And these functions which call each other: (oilrig_1) > # Tower > setblock 2313 116 215 red_concrete > setblock 2313 117 215 light > particle minecraft:flash 2313 117 215 0 0 0 0 0 force > # Crane > setblock 2314 97 177 black_concrete > setblock 2314 98 177 air > # Roof > setblock 2317 106 224 black_concrete > setblock 2317 107 224 air > > execute unless predicate rr:is_day run schedule function rr:block_animations/oilrig_2 1s and two others... I also have this reset function: (oilrig_reset) > ``schedule clear rr:block_animations/oilrig_1 > schedule clear rr:block_animations/oilrig_2 > schedule clear rr:block_animations/oilrig_3 > > # Tower > setblock 2313 116 215 black_concrete > setblock 2313 117 215 air > # Crane > setblock 2314 97 177 black_concrete > setblock 2314 98 177 air > # Roof > setblock 2317 106 224 black_concrete > setblock 2317 107 224 air``` I originally wanted to call these functios via this function which is called in tick.mcfunction: (oilrig.mcfunction) > execute if predicate rr:is_day run function rr:block_animations/oilrig_reset > execute unless predicate rr:is_day run function rr:block_animations/oilrig_1 While this approach "works", it calls the 1st animation every tick, also I have a feeling this approach isnt really elegant? I appreciate any help / reccomendations on how to optimise / fix this.
Continue to help post