Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Current Situation
- The script jobscheduler_event.cmd creates environment variables that are visible to a calling script.
- Therefore script environment variables can interfere and overlap variables with the same name in the calling script.
Desired Situation
- The script jobscheduler_event.cmd should restrict environment variables to the local scope.
Workaround
- When calling the event script from your own scripts then add SETLOCAL and ENDLOCAL before and after that call:
@ECHO Submit event %SCHEDULER_JOB_NAME%_JOB_START to Supervisor SETLOCAL CALL "%SCHEDULER_HOME%\bin\jobscheduler_event.cmd" -x %ERRORLEVEL% -e JOIN_JOB_START -i %SCHEDULER_JOB_NAME%_JOB_START -s %SCHEDULER_HOST% -r %SCHEDULER_TCP_PORT% ENDLOCAL