• Version 1.7.1
Show / Hide Table of Contents

Predefined Schedules and Connection Settings

To simplify development, Session Scheduler provides an ability to define session schedules and connecting settings in configuration files for later referencing in the source code.

To load these descriptions from the XML file, use the SessionScheduler(string, LogFactory) constructor. Later the descriptions could be referenced in the source code using their string identifiers.

For example:

var scheduler = new SessionScheduler("Schedule.xml");

scheduler.Add(session, "SimpleDaily", "LocalSession");

Syntax

Predefined description of schedules and connection setting supports the following tags:

Tag Description
SchedulerSettings Root element
Schedules Collections of predefined schedules
Schedule Session schedule description
Connections Collection of predefined connection settings
Connection Connection settings description

Session Schedule Description

Session Schedule description supports the following attributes for the <Schedule> element:

Attribute Values Notes
id A non-empty string Unique identifier for the schedule. Value of this attribute is used later in the source code to refer to the schedule. It must be unique among all schedules.
firstDay "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" The first day of the session working week.
lastDay "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday" The last day of the session working week.
logonTime Time from 0:00 till 23:59 The session logon time.
logoutTime Time from 0:00 till 23:59 The session logout time.

Connection Settings Description

Connection Settings description supports the following attributes for the <Connection> element:

Attribute Values Notes
id A non-empty string Unique identifier for the settings set. The value of this attribute is used later in the source code to refer to described settings. It must be unique among all settings sets.
host String Counterparty host
port Number Counterparty port

Sample

<?xml version="1.0" encoding="utf-8" ?>
<SchedulerSettings
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="https://ref.onixs.biz/fix/scheduler https://ref.onixs.biz/fix/scheduler/scheduler-settings-1.6.xsd"
  xmlns="https://ref.onixs.biz/fix/scheduler" >

  <Schedules>

    <Schedule
        id="CME"
        firstDay="Sunday"
        logonTime="18:00"
        lastDay="Friday"
        logoutTime="16:00"
    />

    <Schedule
      id="SimpleDaily"
      firstDay="Monday"
      lastDay="Friday"
      logonTime="08:00"
      logoutTime="17:00"
      />

  </Schedules>

  <Connections>
    <Connection
        id="LocalSession">
        <Counterparty host="localhost" port="4500"/>
    </Connection>
    <Connection
        id="SessionToTestingEnvironment">
        <Counterparty host="testing-evn.privatedomain.com" port="8000"/>
    </Connection>
    <Connection
        id="MultiTargetSession">
        <Counterparty host="primary.domain.com" port="4600"/>
        <Counterparty host="secondary.domain.com" port="4500"/>
    </Connection>
  </Connections>
</SchedulerSettings>
In this article
Back to top Copyright © Onix Solutions.
Generated by DocFX