Table of Contents | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
Using Command Line Options
- The command line option
-env=[
adds an environment variable to the JobScheduler.var_name]
=[var_value]
- This variable is established only in the scope of the JobScheduler.
- If a variable [
var_name]
already exists in the user environment then the value of the-env
option will become effective. - The Windows Service of the JobScheduler reads the system and user environment only if it runs in the corresponding user account.
- Environment variables are considered for substitution when used in settings (see Job Scheduler Reference Documentation).
Start Script with -env
Example for starting the JobScheduler with an environment variable:
Code Block |
---|
unix-shell>[install_path]/bin/jobscheduler.sh start -env="hello=world" windows-shell>[install_path]\bin\jobscheduler.cmd start -env="hello=world" |
Environment Variables Script: jobscheduler_environment_variables.(sh|cmd)
The JobScheduler start script reads the environment from the .\user_bin\jobscheduler_environment_variables.(sh|cmd) script.
...
Code Block |
---|
... rem windows SET SCHEDULER_PARAMS=%SCHEDULER_PARAMS% -env="hello=world" SET SCHEDULER_START_PARAMS=%SCHEDULER_START_PARAMS% -env="hello=world" ... |
Windows Service
The Windows Service always starts JobScheduler with the options and environment variables that have been used for installation. During the Windows JobScheduler setup a Windows Service is installed that has to be re-installed in order to make new environment variables effective.
...