Introduction to Logi Scheduler
Logi Info includes the Logi Scheduler, which allows Logi applications to be run by administrators on a scheduled basis. Scheduling features can also be embedded in reports, allowing runtime scheduling by end users.
- About The Logi Scheduler
- Deployment for Windows
- Deployment for Java
- Configuring Scheduler Communications
- Schedule Task Databases
- Quick and Easy Report Scheduling
About The Logi Scheduler
In simple terms, the Logi Scheduler is a proprietary service that runs "in the background" as either a Windows Service or a Linux/UNIX daemon. It maintains its own database of scheduled events and runs them at the desired times and intervals. The Scheduler service has no user interface of its own, but is instead directed to create, maintain, and delete scheduled events by other applications through an application interface.
This service is configured to start up automatically when its host server is started and therefore runs without user intervention. From a performance perspective, it consumes very few resources on the server and spends most of its time idling.
When the Scheduler "runs" an event from its database, it does so by opening a new web server session and calling a specific task in a Logi Info Process definition. That process task can then run reports, send emails, etc. - any of the usual task-driven activities.
The Scheduler service release and its corresponding Logi Info release are
tightly-coupled but you may use the v11 Scheduler service with Logi Info
v12. Meaning, with every release we provide the latest version of Scheduler and you have the option to upgrade your Scheduler version, or keep your current version. Note that if you keep the previous Scheduler build, you will not obtain the associated bug fixes and enhancements.
This topic concerns itself primarily with the preliminaries: understanding the Scheduler service and installing it. A sister topic, Use Logi Scheduler, is also available with more detailed information about how to configure the Scheduler and work with it from within a Logi application.
In addition, there are two sample scheduling applications available from DevNet that can be downloaded and examined for a better understanding of the elements that support the Scheduler. One of these, Scheduler Console, in the General category, is designed for administering the Scheduler on your server; this is the primary tool we provide for this purpose. The other sample application is an example of a report that allows end users to schedule reports at runtime.
For the sake of clarity, the following terms are used in these Scheduler
|Scheduler||The Windows service or Linux daemon that runs in the background and runs events at the times and intervals detailed in its database.|
|Scheduler Task||An event (one record) in the Scheduler's database. Contains details of time, frequency, interval, and the ID of the target process to run.|
|Process Task||A task within a Logi Info process definition in a Logi application. A Scheduler Task "runs" a Process Task at the desired time/interval.|
|Schedule XML||The XML representation of the scheduling details for a Scheduler Task. May include date, time, frequency, etc.|
|Schedule||An element used in report definitions which includes a user interface with controls, for the purpose of creating or editing a Scheduler Task.|
|Schedule Intervals||The time intervals that can be used in a Scheduler Task: Once, Daily, Weekly, Monthly, Minutes, and Hourly.|
The Scheduler is supported by special elements for both report and process definitions and these are introduced later on.
In a Windows environment, installation of the Logi Info Scheduler Service for .NET is accomplished as part of the Logi Info product installation. However, it's not selected for installation by default - you need to select the Custom installation option and indicate that it be installed. You can run the installation program again at any time and modify the installation to include the Scheduler if you need to.
As shown above, you must click the icon next to the Scheduler item and select "This feature will be installed on the local hard drive." from the drop-down list of options. Note that there are separate schedulers for .NET and Java applications.
By default, the .NET scheduler files will be installed to: C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service. In the rest of this topic, the installation folder you specified, the default or a custom location, will be abbreviated as <installFolder>.
After installation is complete, you can use your Windows administrative tools to examine your services. The Logi Info Scheduler Service should appear as shown above, its status should be "Started", and it should be configured to start automatically.
Due to the flexible nature of the Scheduler and its interactions with Logi
Info applications, you can install the Scheduler on a
different server than the application web server, separate from
Logi Info, if desired.
With Logi Apps Using Logi Security and AuthNT
If you're planning to use the Scheduler to run secure Logi applications that use the "AuthNT" authentication source, then you need to configure the Scheduler service to log on using an account that can be authenticated in the domain. The default installation configuration uses the Local System account, which is only valid on the local machine. This configuration is independent of setting the Run As name for Scheduler tasks or the Scheduler User Name in the _Settings definition.
If the Logi application is using any Active Directory groups to filter
domain users, then the domain account used by the Scheduler must also
belong to those groups. The account doesn't have to be an Administrator on
the server running Scheduler, but it does need these minimum permissions
to access the Scheduler database, log errors, etc.:
|Folder or File||Permissions|
|C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service||Read|
|C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service\Schedules.vdb3||Read, Write|
|C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service\Log||Read, Write, Create|
|C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service\RunNowTasks||Read, Write, Create, Delete|
To change the account being used by the Scheduler:
In the Services administrative tool, double-click the Logi Info Scheduler Service to view its properties, as shown above, then select the Log On tab. Check This account: and provide valid domain account information and click OK. Then stop and restart the Scheduler service.
The Logi Info Scheduler Service for Java runs on the Linux/UNIX or Windows operating systems. It's distributed as part of the Logi Info product and, regardless of the server type that you plan to run it on in the end, in order to access its files it must first be installed on a Windows machine, using the Windows product installer, as shown in the previous section. Naturally, during the process you select the Scheduler Service for Java feature option, not the service for .NET.
The default installation location is:
C:\Program Files\LogiXML IES Dev\LogiXML Scheduler Service Java.
In the rest of this topic, the installation folder you specified, the
default or a custom location, will be abbreviated as
On a Windows Server
By default, the Scheduler Service for Java, installed on a Windows server, isn't configured to start automatically. Instead, it's started by running:
When running the Scheduler Service for Java on Windows 7 or Windows Vista, the User Account Control (UAC) system can interfere with normal operations of the Scheduler, as the <installFolder>\Log, \RunNowTasks and \Schedules folders require Write file access permissions. There are two options to resolve this: either disable UAC on the server, or use UAC to set the privileges of these directories to allow Write access. This MSDN article provides more information about UAC should you need it.
If you wish to start the Scheduler service automatically, and you feel
comfortable directly modifying system-level configurations, use the
Registry editor to add a String value in
Set its Value Name to
and its Value Data to
On a Linux/UNIX Server
In order to subsequently install the Scheduler Service for Java on a Linux/UNIX server, copy all of the subfolders and files from the <installFolder> on the Windows machine to the desired installation folder on your Linux/UNIX server. That folder on your Linux/UNIX server now becomes your <installFolder> for the rest of this discussion.
The Scheduler is started by running <installFolder>/bin/Scheduler.sh. Don't use a symbolic link for this, as it may lead to unstable behavior.
To start the Java scheduler automatically, add a line to /etc/rc.d/rc.local. The invocation should be similar to
- /opt/LogiSchedulerJava/Scheduler.sh &
Note that the ampersand (&) at the end is significant: it causes the application to load as a background process.
Due to the flexible nature of the Scheduler and its interactions with Logi Info applications, you can install the Scheduler on a different server than the application web server, separate from Logi Info, if desired.
The Logi Scheduler "listens" for requests on a specific port. For security purposes, a key value is set for each instance of the Scheduler. Logi Info applications that wish to communicate with the Scheduler have to be internally configured with the same key value in order to be identified as legitimate clients of the service. By default, the appropriate Logi Info elements and the Scheduler are installed already configured to communicate on the same port and with the same default key value. However, both of these attributes can be changed by (1) setting the appropriate attribute values in your Logi Info application's _Settings definition, and (2) editing the text file named _Settings.lgx in the Scheduler's <installFolder>. For more information about this procedure and the Scheduler in general, see Use Logi Scheduler.
The Scheduler Service for .NET normally stores its scheduled task data using an embedded instance of VistaDB, a text-based database; for the Scheduler Service for Java, an embedded instance of Apache Derby is used.
You also have the option of storing the data instead in a networked Microsoft SQL Server, Oracle, MySQL or, in Logi Info v12.5+, PostgreSQL database. In order to use one of these SQL database servers, you must first create the Tasks table in a database of your choice, and then configure the Scheduler's _Settings.lgx file appropriately, as described inUse Logi Scheduler. Example SQL scripts for creating the Tasks table on each of the supported database servers are installed with the Scheduler in its <installFolder> for your use.
Multiple Scheduler Instances
Support for storing task data in networked databases allows multiple instances of the Scheduler service to run at the same time, on multiple servers, creating a fault-tolerant configuration. If one of the Scheduler instances goes down, the remaining instances will continue to function. Having multiple Scheduler service instances will not result in a task being run more often than its designated frequency. The Scheduler service can be installed independently of the full Logi Info product.
A multi-instance configuration is not supported when using the standard embedded VistaDB (.NET) or Derby (Java) databases.
For the purposes of interacting with multiple Scheduler service instances from a Logi application, the application's _Settings definition must be properly configured to address all of the instances. This is discussed in Use Logi Scheduler.
Developers or administrators who just want to run Logi applications on a scheduled basis can do so by:
- Installing the Logi Scheduler
- Downloading the Scheduler Console Sample Application from DevNet
- Registering the sample application with your web server via Logi Studio
- And running it to create and manage Scheduler tasks.