Alarm Events on Ignition Edge vs primary Gateway

Hi, relatively new user here. I'm working on a system with Ignition 8.1.20 on a primary server and Ignition Edge 8.1.17 running on Groov Epic controllers. We have MQTT synching the Edge tags up to the primary Ignition server.
I've noticed that Alarm Event scripts get synched as well. We have Alarm Active and Cleared event scripts on the Edge device controlling beacon lights. My question is how to tell where the script will run, since it exists on both the Edge and primary Gateway devices. Will both copies of the script run? If so, is there a way to give priority to Edge vs the primary Gateway?