Running The Executive Server 

The Executive Serve is the processing engine for SmartBatch. It processes the Operations, Steps and Jobs according to schedules and dependencies. Everything it does is based on the configuration in the database. The Executive Server determines when objects get processed, updates status, writes log records and creates notification events.

Running The Executive Server

The Executive Server is configured as a Windows Service so that its capabilities are always available when the computer is running. Executive Server processing/Scheduling can only occur if the Executive Server Service is running. You can determine this by opening the Services applet and scrolling down to the SmartBatch Executive Server entry or by seeing the esService.exe process in the Windows Task Manager's Processes list.  The Executive Service status can be determined in the SmartBatch Administrator using the Service Settings Window.

Running The Executive Server as an Windows Service

Windows has the capability to run programs at system startup without requiring a user to be logged on. This is done with a program called a Windows service. Windows operating systems provide the service capability managed by the Service Control Manager (SCM). Programs must be specifically designed to run in this manner so that they can properly communicate with the SCM. When you installed SmartBatch on your Windows system the SmartBatch Service was installed. If this failed (probably due to a security violation), you will need to rerun the installation and reinstall the SmartBatch. The SmartBatch service entry in the Control Panel applet Services is: SmartBatch Executive Service.

Note: You can use the Set Services item from the File Menu to Start, Stop, Pause and Continue the SmartBatch Service along with the ability to Ping the Executive Server or Remote Agent.

If the Executive Server has been installed as a service under Windows, it should be running. The Administrator can verify that the Executive Server is running by using the Ping button on the Service Settings window.

Supported Executive Server Operating Systems  

The Administrator can be run on Windows 7 and beyond.  The Executive and Notification servers must be run on Windows 2003, Windows 7 or beyond.  It is recommended to use Windows 2008R2, Windows 7 or later for any of the SmartBatch components.

Executive Server Processing At Startup

At start up, it determines if there are any old schedules (that is, schedules with Next Run Dates and times that are less than the current date and time) or objects that were in process when the computer was shut down. If any object has an old schedule or was in-process (that is, with a status of Running), the object may be placed in the Status window with a status of Pending. A Pending object’s status can be changed from the Status Window by resuming or removing the object. As long as an object has a Pending status, it will not process.   A schedule can define the processing it should have when the Executive Server restarts.  This is defined on the Schedule Properties window.

Processing Operations, Steps and Jobs

The Executive Server processes an Operation, Step or Job when its schedule occurs or immediately, if it is scheduled on-demand (e.g., using the Execute right-click menu item on the Operation List, Step List or Job List). If the Executive Server is processing a Job, it first checks for any Job-level dependencies. If there are dependencies, it waits until these dependencies are satisfied before processing the first Step and first Operation within the Job. Steps within the Job are processed in the order they appear on the Step Properties window. If the Executive Server is processing a Step, it checks for any Step-level dependencies. If there are dependencies, it waits until these dependencies are satisfied before processing.

The Executive Server replaces any Parameters and executes the Operation. At the end of an Operation, it determines whether or not the Operation ran successfully and generates a notification event, if any. The Executive Server determines when to create Notification events and writes entries to the History based on the Operation configuration information from the Operation Properties window.

Cross-system Scheduling (Enterprise Edition)

Before running an Operation, the Executive Server determines if the Operation is to be run locally or on another computer. If it runs locally, the Executive Server makes a call to the operating system to start the Operation. If it runs on another computer (i.e., remotely), the Executive Server queues the request to the SmartBatch Remote Agent. The Remote Agent will make a call to the operating system on the computer it is processing on to run the Operation. The information about the Remote Agent processing is kept in the database used by the Executive Server.  If the Operation, Step or Job in which the Operation exists has a Computer Group assigned the Computer Group is used in deciding how to process the Operation. Depending on the type of Computer Group, the Operation may be load-balanced, process on all computers within the group or a specific computer may be selected.

Executive Server Processing On Shutdown

When the computer is shut down normally (that is, an Operator or automated process has requested the system to shut down), the Executive Server is notified of the event. Any running object will be given a Pending status. These programs will be stopped by the operating system outside of the control of SmartBatch. If the computer is shut down abruptly (such as the occurrence of a power failure), the information in the database is kept intact by the database management system in use (i.e., SQL Server). If the database is on the computer that went down, it will not be accessible until the computer is restarted. At the time the Executive Server is started, the status of any running objects or objects that should have run will be changed to Pending.

Executive Server Health Monitor

The Executive Server monitors for situations where an object has not been processed (i.e., run) and its scheduled time to process has past.  The following two situations are monitored:

An object has been in the Queued Status for a configurable amount of time.  An object is placed in the Queued status when it has been setup to run on a Remote Agent but the Remote Agent has not yet processed the request.

An object has missed its scheduled start time for a configurable amount of time.  The object remains in the Waiting status but for some reason has not processed.  This problem should typically be reported to OnLine ToolWorks Corporation providing the Executive Server Log file as detail to help determine why this occurred.

Note:  The default time is 5 minutes.  If you need to change this value, update the esservice.exe.config file entry "StatusNotifyTime".

If either situation is detected by the Executive Server, a notification event is generated and any Operators on an Alert List marked as a System Alert List is notified.