Uploaded image for project: 'JS - JobScheduler'
  1. JS - JobScheduler
  2. JS-1336

Restrict scope of environment variables in Windows event script

    XMLWordPrintable

    Details

    • Type: Fix
    • Status: Released (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.6, 1.8.3, 1.9
    • Component/s: None
    • Labels:
      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
        

        Attachments

          Activity

            People

            • Assignee:
              oh Oliver Haufe
              Reporter:
              ap Andreas PĆ¼schel
              Approver:
              Uwe Risse
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 4 hours
                4h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h