7.7 Programmatic Scheduler Access
The scheduler can be started and stopped from the Enterprise Manager interface, however, the scheduler can also be used as a standalone application through the ScheduleServer class. It has a main method so that it can be run as a process.
java -Dsree.home=. inetsoft.sree.schedule.ScheduleServer
If the classpath is not already set (e.g., by an environment variable), the classpath should also be specified, as follows:
java -cp {CLASSPATH} -Dsree.home=. inetsoft.sree.schedule.ScheduleServer
where {CLASSPATH} is typically
{InetSoftInstallation}\server\webapps\sree\WEB-INF\lib\bisuite.jar; {InetSoftInstallation}\server\webapps\sree\WEB-INF\lib\etools.jar
The launching application can then get an instance of the Scheduler object:
Scheduler scheduler = Scheduler.getScheduler();
The Scheduler API can be used to programmatically add tasks and perform other management functions. However, this is normally not necessary because the Enterprise Manager allows for easy visual configuration. The only exception is tasks with user-defined conditions, which have to be created programmatically and added to a scheduler from the launching application.
The scheduler can be run as a thread inside another Java process. The scheduler creates a number of internal threads when the main thread is started. The main thread can be started using the Scheduler.start() static method. The scheduler is a singleton object. This means there is always one scheduler instance in any JVM process. The start() method can be called multiple times, and the call is ignored if a scheduler has already been created.
Scheduler.start();
| << 7.6 Viewing the Scheduler Log | © 1996-2013 InetSoft Technology Corporation (v11.4) | 7.8 Automated Alerts >> |