Task scheduler of Foresight Analytics Platform can be started manually from the command line with specified parameters.
The task scheduler with specified parameters is created after creating a configuration file and differs depending on the operation system in use.
In Linux OS start the task scheduler from the command line by executing the command:
DISPLAY=:987 ./Scheduler [-<Parameters>]
In Windows OS start the task scheduler from the command line by executing the command:
Scheduler.exe [-<Parameters>]
IMPORTANT. If task schedulers are to be started on different computers or virtual machines, use only one task scheduler instance to work with each repository. If several task schedulers are to be started on one computer or virtual machine, it is required to use different configuration files for started task scheduler instances configured for different task containers.
Task scheduler startup parameters differ depending on the selected operating system:
The following parameters are used in Linux OS:
-p pid-path. Full path to the pid file.
-e. Indicates whether only error messages are logged, the rest of the messages are skipped.
-d. Indicates whether the file is started as a service.
-x. Indicates whether input/output/error streams are redirected. The parameter is ignored if the -e parameter is set.
The following parameters are used in Windows OS:
Instance. Starting task scheduler instance with specifying the settings file:
The task scheduler's configuration file is named Scheduler.xml by default. If it is necessary to start the task scheduler with another configuration file, run the following command:
Scheduler.exe –Instance <name>
where "name" is a configuration file name specified without the extension "xml". For example:
Scheduler.exe -Instance Test
After this command is executed, a task scheduler instance starts that is set up to use the Test.xml configuration file
Silent. Do not notify about an already started task scheduler with the specified settings:
To start the task scheduler without notifying about an error of an already started task scheduler, use the Silent parameter. For example:
Scheduler.exe -Instance Test -Silent
After this command is executed the scheduler starts using the settings stored in the Test.xml file. If the task scheduler using these settings is already started, a new instance of task scheduler is not started, and error message is not displayed.
MultipleInstances. Disabling the blocking of starting several instances of task scheduler configured to the same configuration file. This setting is relevant only for server operating systems.
To start the instance of the task scheduler within the current server operating system, if the process has been already started within some other parallel session, use the MultipleInstances parameter. For example:
Scheduler.exe -Instance Test –MultipleInstances
After this command is executed, a task scheduler instance starts that is set up to use the Test.xml configuration file. If this command is executed again, another task scheduler instance can be started.
These parameters can be used together.
See also:
Starting Tasks for Execution | Creating a Configuration File