Thank you for the reply. :)
This isn't VC variables but script variables scope issue. Let me give a little more info to clarify.
The application configuration tool maintains a file called ENV.bat which contains the variables like JAVA path, Weblogic home, etc. This changes per environment and with each patch. The application service reads this file to start the application correctly. So this ENV.bat would be cumbersome to hard code into a VC job.
I would like for VC to call a bat or powershell file on the server, say RUNTHIS.bat. Inside RUNTHIS.bat (which would be the same on all of my application servers), it does a call to ENV.bat to set its environment before running its tasks (say restart the application). In a bat file that is just a one line of "call ENV.bat".
So RUNTHIS.bat looks something like:
call ENV.bat
%APP_HIOME%\startprocess.exe
If I run RUNTHIS.bat on the server using cmd, the environment variables from ENV.bat are read in and the startprocess,exe has no issues running correctly.
However... in VisualCron it does not honor the call to the ENV.bat... There are no errors but the variables set in ENV.bat are lost before the next line of the RUNTHIS.bat executes. The same is true calling a remote Powershell job that does a ". ENV.ps" type of call to pull in variables from another powershell. Something is off with the variable scope in VisualCron which prevents the normal windows scope. Maybe there is a setting or flag that I can use?