Try TT Now

All Gateways

TTChron Scheduling Sections

Overview

Each section in ttchron.ini begins with a section name enclosed in square brackets. Section names are not sensitive to case. All lines that follow a section name, up until the next section name, are considered a part of that section.

ttchron.ini uses the following section types:

  • Global Parameters
  • Holiday
  • Job
  • Server
  • Service

The ttchron.ini file can contain multiple sections of each type.

For descriptions of available parameters, refer to TT Chron Parameters.

Global Parameters

TTChron defines any parameters before the first named section in ttchron.ini as global parameters. These parameters do not belong to any particular TTChron section (i.e., the Global section is at the very top of the ttchron.ini file) but instead determine general TTChron behavior.

Example Global Parameters

cycle_freq=1

svc_freq=5

logging=ALWAYS

Holiday Section

The Holiday sections store sets of dates on which you do not want to run particular processes. To prevent a process from running on a set of dates, list this set in a Holiday section, and then reference the Holiday section in the process’s section.

Holiday sections list dates in the format M/D/YYYY, where M is the one or two-digit month, D is the one or two-digit day, and YYYY is the four-digit year. Although you can assign any name you want to a Holiday section, it cannot begin with the characters: win32-. You can enter multiple Holiday sections in the ttchron.ini file as long as you name each section uniquely.

To reference the holiday section, add the parameter holidays to the process’s section with the value set to the name of the holiday section.

Example Holiday Section

[Holidays-UK]

1/1/2015

12/25/2015

For scheduling purposes, a holiday is defined as the date in which the starting time of the trading session falls.

If the trading session occurs across two continuous dates, then the holiday should be the date in which the starting time occurs.

Example [Holidays-UK] 1/1/2015 12/25/2015

If the following represents the regular exchange schedule:

schedule=S@14:00-16:35/2;MTW@16:40-16:35; R@16:40-19:05/2

and the exchange is not in session for Friday, 3/20/2015, then the correct holiday date equals 3/19/2015 since the session for 3/20 actually starts on Thursday, 3/19 at 16:40.

Note

Currently, TTChron does not properly support configuring a holiday in a section which contains a weekly session. This may result in TTChron stopping processes at the incorrect time.

Therefore, users should not attempt to configure holidays for sections that have weekly schedules.

Job Section

A Job section schedules a program to start (run) at a specific time. After starting the program, TTChron does not stop or monitor it. The name for a Job section must begin with win32- (but not win32-svc- or win32-server-). The identifying name that follows win32- does not have to be related to the name of the executable program.

The following example schedules cmd.exe to run at 11:00 AM on Sunday. TTChron initiates cmd.exe (located in C:WINNTSystem32) in a maximized command window with the additional command arguments of /c C:ttbindelete_price_tables.bat CME. This program does not run on any days listed in the Holiday section titled Holidays-UK. When you manipulate the program from TTK, you use the tag: CME.

Example Job Section

[win32-delete_CMEprice_tables]

path=C:WINNTSystem32cmd.exe

args=/c C:ttbindelete_price_tables.bat CME

run_flags=CONSOLE

window=MAX

holidays=Holidays-UK

tags=CME

schedule=S@11:00

Server Section

A Server section is similar in all respects to a Job section and uses the same parameters. However, the name of a Server section begins with win32-server- and the remainder of the name is arbitrary. Like the name of a Job section, the name of a Server section need not relate to the actual name of the executable.

TTChron actively monitors programs that have Server sections in the ttchron.ini file, such that:

  • If a program is not running but should be, TTChron starts it.
  • If a program is running but is not scheduled to, TTChron shuts it down.
Note

If you need to set Order Routers to run in ttchron.ini, include only one Server section to manage all your Order Routers. In this section, the count parameter determines the number of Order Routers that run on the TT Gateway.

In the following example, ttchron.ini sets TTChron to run LIFFEOrderRouter.exe located in C:ttbin (the path setting). Each day it starts at 5:10 AM and shuts down at 8:00 PM daily from Monday to Friday (the schedule setting) with nosvc -e LIFFE as an argument in the command (the args setting). All instances of the LIFFEOrderRouter.exe program run in an individual command window (the run_flags setting), which will be maximized or minimized depending upon the global setting. TTChron starts up no more than eight LIFFEOrderRouter.exe processes at a time (the max_at_once setting) and wait 60 seconds before starting another eight LIFFEOrderRouter.exe processes (the throttle setting). It continues to start eight processes and wait 60 seconds until 16 processes have been spawned (the count setting). When you manipulate the program from TTK, you use the tag: liffe.

Example Server Section

[win32-server-LIFFEOrderRouter]

schedule=MTWRF@5:10-20:00/1

path=C:ttbinLIFFEOrderRouter.exe

args=nosvc -e LIFFE

run_flags=CONSOLE

count=16

max_at_once=8

throttle=60

tags=liffe

Service Section

Service sections configure the run time parameters of Windows services. Service sections begin with win32-svc- and the remainder of the section name must match the actual name of the service. This is not necessarily the name that displays in the Services dialog box. To determine a service’s actual name, refer to the following section called Service Names.

In all other respects, Service sections are the same as Server sections.

Example Service Section

[win32-svc-guardian]

run_days=6

start_time=0:15

end_time=23:50

days_in_cycle=7

Service Names

When creating a Service Section in ttchron.ini, you must use the service’s name in the section name.

To identify a service name:

  1. From the Start menu, point to Settings, and then click Control Panel.

    The Control Panel displays.

  2. Double-click Administrative Tools.
  3. Double-click Services.

    The Services Dialog box displays.

  4. Scroll down the list in the Services dialog box to locate the service whose name you want to identify.
  5. Right-click the service, and then click Properties.

    The service’s Properties (Local Computer) dialog box appears. In the General tab, top left is the Service name. In the figure below, the Service name is NYSE_Liffe-EOrderserver (see circled text).

Directory of Service Startup

Although dir and path do not function in Service sections, you can configure the startup directory for a service in the registry at:HKEY_LOCAL_MACHINESOFTWARETrading TechnologiesServicesWorkingDirsTo set the working directory, add a key to this registry and assign it the identical name as the Service (e.g., if the name of the Service in the Services dialog box is CME, you must assign the key the name of CME). Add the working directory as the Data Value of the key.In the future, whenever TTChron starts this service, it does so from this directory. By default, TTChron starts Services from the directory in which the executable resides.

Disabling Sections

At times, you may need to disable a section in ttchron.ini but not remove it entirely; for instance, in case you need to reuse the section at a future date. When you disable a section, TTChron ignores it.

The behavior of disabled sections is dependent on your version of TTChron:

  • Previous versions of TTChron: automatically closes a disabled service that is manually launched. However, older versions of TTChron allow a disabled server to be manually launched.
  • TTChron Version 7.7 and higher: enhanced to automatically close either a disabled service or server that is manually launched.

To disable a section in ttchron.ini:

  1. To disable a section in ttchron.ini, add disable on a unique line at the end of the section.

    Example Disabled TTClean Section

    [win32-TTClean]

    path=c:ttbinttclean.exe

    args=-V

    schedule=SMTWRFB@22:15

    disabled

  2. Another way of disabling a section in ttchron.ini is to comment out all lines (add a # to the beginning of each line). If you use this technique, to enable the section, you must simply remove the # symbol from the relevant lines of the ttchron.ini section.

Enabling Sections

To enable a section in ttchron.ini, remove disable parameter.

Example Enabled TTClean Section

[win32-TTClean]

path=c:ttbinttclean.exe

args=-V

schedule=SMTWRFB@22:15