Unix/Linux Command (Execute)

Use the Task Execute Unix/Linux Command (under Unix/Linux) to run commands on Agents running on Unix or Linux. This allows you to schedule any action that can be performed by a command line. For example, you can use this Task to execute scripts.


  • Scripts that you run on an Agent for Unix/Linux or Mac OS X using the Tasks Execute Unix/Linux Command cannot include reboot and shutdown commands.

Settings tab

  • Use the option Insert resource link from the toolbar in the Command line box to specify a Resource. When inserting a Resource link, the GUID of the selected Resource will be used in the command line. The Resource will be added to the command line box as $Workspace{<resource GUID>}. When the Task is executed, the Resource will be downloaded to the Agent`s cache automatically and will be called from that location.
  • The option Set parameter with exit code allows you to place an exit code into a parameter, for use in another Task in the Module. For example, suppose you have configured a Module with this Task and another Task that installs certain software. By using the option Set parameter with exit code in the first Task, you can use this parameter in a condition in the Task that installs software, to determine whether it should be executed.
  • The option Set parameter with standard output allows you to place the standard output into a parameter, for use in another Task in the Module (e.g. a Query).
  • In the field Timeout command execution after, you can specify a maximum number of 9999 minutes (about 166 hours and 40 minutes). You can use parameters, functions and variables.
    • When 0 timeout is detected (when 0 was entered or when parameter, functions, variables translate to non-numeric values) the fallback will be the maximum timeout period (9999 minutes).
    • In certain situations, Agents can continue to execute the remaining commands in the script when the timeout expired. You can prevent situations like these by selecting the option Terminate process when timeout expires.

Script tab

  • Scripts can be typed in directly.
  • Use the File extension of script field to specify the file extension that Ivanti Automation should use. This extension is used to save the script as a script file in the specified format when the Task is executed. Ivanti Automation will save this file in the temporary folder on the Agent that executes the Task.
  • The Scripts tab has a limit of 64KB. If you use an external editor to edit a script, Ivanti Automation will disregard any characters that exceed this limit.
  • Log and error files are included in the detailed Job history.

When aborting a Job that contains Task Execute Unix/Linux Command, any running scripts and processes will also be terminated.