Set PATH Environment Variable RRS feed

  • Question

  • Is it possible to set the %PATH% environment variable on a per job basis?

    This is the error that I get when my tasks run trying to set PATH through the C# API.

    Error from node: NODE1:Exception 'Item has already been added. Key in dictionary: 'Path'  Key being added: 'PATH'' reported creating the task.

    A specific program requires a directory in PATH, but I don't want to set it globally for all users and applications that run.

    Thursday, October 9, 2014 2:22 PM

All replies

  • To specify env var at job level, you can switch to "Environment Variables" page and add an item when you create a new job in GUI.

    This is also supported in CLI & API.

    Monday, October 13, 2014 2:30 AM
  • I'm using csharp for programmatic submission.

    The method SetEnvironmentVariable() works for all variables but %PATH%

    Wednesday, October 22, 2014 8:23 PM
  • Can you check whether you're using the scheduler job api to set the environment variable? As it will work just fine if I set env for Path for the job in the Job submission job GUI.


    Qiufang Shi

    Monday, October 27, 2014 9:51 AM