you can do so by execute rule, based on slot value changes for slot you are looking in an event.
Place the script in kb folder of cell and call it using the execute rule based on the condition you are looking for.
you can check more about execute rule here .
Let me know if you need more help on this.
You can push configuration variables, including the arsAction variables, to PATROL agents using TrueSight Operations Management's Infrastructure Policies. You will need to create a Monitoring Policy and click on the Configuration Variables tab. Here is a link to the relevant page in the documentation. You can define the configuration variables directly in the TrueSight UI, or you can import them from a file.