is there a way to execute a system command from within trafficscript?
For example. If i wanted to place a message on to message bus based on an event triggered in a trafficscript rule. i may want to
But i cant see system() or exec() within the trafficscript documentation.
I note i can run arbitrary commands for other "events", but rules appear to be TS only.
Solved! Go to Solution.
There is no direct way to make a system call to execute something from TrafficScript equivalent to system() or exec functions in other languages..
There are some ways in which functionality like this can be emulated but with a few caveats:
1) "Non blocking ONE-WAY" execution (ie: one where the output of the executed event cannot be processes) in a "fire and forget" fashion. This is useful for a custom alert program that something happened.
2) "A Blocking Interactive" execution (ie: one where the output of the executed event can be processed). This is useful if the output of the execution needs to be processed:
Does this help?