Pinnacle :
SpawnCommand
SpawnCommandNoWait

Description

  • Allows the operating system to take control
  • Used to call external scripts (e.g. a bash, Python or Perl script)
  • Used to execute command line operations

SpawnCommand

  • Pinnacle transfers control to the operating system and waits until the action is complete.

Examples

Generic call 

SpawnCommand = "String";

Execute a command line action

SpawnCommand = "ls -ltr > /home/p3rtp/DirList.txt"; //Operating system will run ls -ltr and save the output in a text file name DirList.txt

Hard-coded command to call a bash script

SpawnCommand = "bash /home/p3rtp/Scripts/DoesGreatStuff.sh ScriptInput1 ScriptInput2"; //Runs a script with two variable input

Dynamically generated command to run a bash script

Store.StringAt.PrintIsoDoses = "bash /home/p3rtp/Scripts/DoesGreatStuff.sh ";
Store.At.PrintIsoDoses.AppendString = PlanInfo.MedicalRecordNumber;
Store.At.PrintIsoDoses.AppendString = "-isodose";
SpawnCommand = Store.StringAt.PrintIsoDoses;//No quotes

SpawnCommandNoWait

  • Pinnacle transfers control to the operating system which is then immediately transferred back to Pinnacle. Transfer of control back to Pinnacle may occur before the action is complete.

Examples

Any of the “SpawnCommand” examples above can be used with “SpawnCommandNoWait”, however, Pinnacle will continue running the main script without waiting for the called scripts to finish.

Generic call

SpawnCommandNoWait = "String";

Execute a command line action

SpawnCommandNoWait = "ls -ltr > /home/p3rtp/DirList.txt"; //Operating system will run ls -ltr and save it in a text file name DirList.txt