To define a different default working directory for system agent running jobs

Document ID : KB000054788
Last Modified Date : 14/02/2018
Show Technical Document Details


By default, the working directory for a system agent is the agent installation directory. What if customer wants to define a different default working directory in their jobs.


There is a parameter that can be set in agentparm.txt file.

oscomponent.initialworkingdirectory= <SCRIPT|USER|PATH>

It defines default initial working directory for all the scripts

  • SCRIPT sets the path to where the script resides

  • USER sets the path to the home directory of the owner of the script

  • PATH sets the path to an absolute path to where the script should run

If you do not specify a value, the parameter defaults to the path where the running cybAgent resides.
Note: You can override the InitialWorkingDirectory on a per-job basis by specifying a value for the PWD Environment variable.