Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The commandline option -env=var_name=var_value adds an environment variable to the Job Scheduler JobScheduler.
This variable is only in the scope of the Job Scheduler JobScheduler established.
If a variable var_name already exists in the user environment then the value of the -env option wins.
A Windows service of the Job Scheduler JobScheduler reads only the system and user environment if it has the corresponding user account.

...

Startscript with -env

Sample for starting the Job Scheduler JobScheduler with the variable hellh1. world:

...

Edit jobscheduler_environment_variables.(sh|cmd) file

If you always want to start the Job Scheduler with additional environment variables then you can edit the SCHEDULER_PARAMS variable in the install_path/bin/The JobScheduler startscript reads the environment from the .\user_bin\jobscheduler_environment_variables.(sh|cmd) script.
You find an example .\user_bin\jobscheduler_environment_variables.(sh|cmd)-example. Rename this file to .\user_bin\jobscheduler_environment_variables.(sh|cmd).
On Unix make sure that ./user_bin/jobeditor_environment_variables.sh is executable.
Edit .\user_bin\jobscheduler_environment_variables.(sh|cmd) file. if you always want to start the JobScheduler with additional environment variables.
Then it is not necessary to call the above startscript with the -env option.

Sample snippet of install_path/user_bin/jobscheduler_environment_variables.(sh|cmd) for adding the variable helloworld:

Code Block
 ...
 # unix sample
 SCHEDULER_PARAMS="... \"-env=export hello="world\"
 ..."
Code Block
 ...
 rem windows sample
 setSET SCHEDULER_PARAMS=...%SCHEDULER_PARAMS% -env="hello=world" ... 
 SET SCHEDULER_START_PARAMS=%SCHEDULER_START_PARAMS% -env="hello=world"
 ...

Windows Service

A Windows service always starts Job Scheduler JobScheduler with the options which are installed. After the Windows Job Scheduler JobScheduler setup a service is already installed so that it must be reinstalled with additional environment variables.

For this close the services dialog (services .msc) if necessary and ...

  • stop the Job Scheduler JobScheduler if necessary
Code Block
 windows-shell>[install_path]\bin\jobscheduler.cmd stop
  • remove the Job Scheduler JobScheduler service
Code Block
 windows-shell>[install_path]\bin\jobscheduler.cmd remove
  • install the Job Scheduler JobScheduler service with -env option or edit the jobscheduler_environment_variables.cmd file like above
Code Block
 windows-shell>[install_path]\bin\jobscheduler.cmd install -env=hello=world
 ...or...
 windows-shell>[install_path]\bin\jobscheduler.cmd install
  • start the Job Scheduler JobScheduler service
Code Block
 windows-shell>[install_path]\bin\jobscheduler.cmd start_service