Configuring the scheduler

Tasks and events are defined in the Scheduler.xml file. If you want to add or change tasks or events in the Scheduler.xml file, make the changes to the Scheduler.xml file from the artifacts.

A standard XSD to validate the scheduler XML is supplied with the scheduler. Called Scheduler.xsd, it ensures that the scheduler XML file conforms to the required scheduler format. The XSD also allows Transaction Server to log more specific messages for XML format errors instead of generic error parsing XML messages.

The files that you need are provided in the FTM artifacts pod and must be downloaded from the pod. For more information about getting files from the artifacts container for your offering, see Getting the files from the artifacts container for your FTM offering.

The scheduler XML file format is shown in the following example.
<?xml version="1.0" encoding="UTF-8"?>
<SCHEDULER>
   <INCLUDE>KEYX</INCLUDE>
   .
   .
   <PARAMETERSET>
     .
     .
   </PARAMETERSET>
   <TASK>
     .
     .
   </TASK>
   <EVENT>
     .
     .
   </EVENT>
   <TASK background="yes">
     .
     .
   </TASK>
       .
   <SECTION include="KEYX" name="Section Name">
      <TASK>
        .
        .
      </TASK>
      <EVENT>
        .
        .
      </EVENT>
      <SECTION include="KEYZ" name="Inner Section Name">
        .
        .
      </SECTION>
   </SECTION>
     .
     .
   <SECTION include="KEYY" name="Another Section Name">
     .
     .
   </SECTION>
   .
</SCHEDULER>
This example is standard XML formatting and contains the tags and tag sets that are shown in the following table.
Table 1. Scheduler XML tags and tag sets
Tag Description
<?xml...> This tag specifies that the scheduler is an XML document.
<SCHEDULER> This tag set contains the entire scheduler configuration.
<INCLUDE> This tag contains the include attribute value of a section tag set that is to be included in this instance of the scheduler. Only one value can be specified in each include tag. To include multiple section tag sets in the scheduler, use multiple include tags.
Note: The value for this tag can include special characters, such as commas.

The include tag does not affect tasks and events that are not inside a section tag set.

<PARAMETERSET> The parameterset tag is used to create a list of one or more parameter tags that the event tag sets can reference. This list is useful when multiple events need to use the same parameters and their values.

When a parameter set is referenced in an event tag set, the scheduler behaves the same as when those parameters are defined directly in that event tag set. If a parameter is defined in both the parameterset tag set and the event tag set, the value from the event tag set is used.

<TASK> Scheduler tasks are defined by using this tag set. In the example XML, the second task specification uses the background="yes" attribute setting. This attribute setting causes the task to run in the background. For more information on running tasks in the foreground and background, see Recurring tasks.
<EVENT> Scheduler events are defined by using this tag set. For more information about configuring events, see Event handler registration.
<SECTION> The section tag set is used to conditionally include one or more tasks, events, or sections in the scheduler XML that is loaded. This tag set has the attributes that are shown in the following list.
include
This attribute defines the value to specify in an include tag when the section is to be included in the scheduler XML that is loaded.
name
This attribute identifies the section in logs. Using a unique name for each section helps with any problem determination.
Note: Parameterset tags cannot be used in a section.
<CONFIG> The config tag is used to specify the name of a scheduler fragment XML file to load. The scheduler fragment file is parsed and validated against the XSD in the SchedulerFragment.xsd file. For more information about scheduler fragment XML files, see Scheduler fragment files. This tag has the attributes that are shown in the following list.
required
Set this attribute to true to force a scheduler fragment XML file to be available. If the fragment file is not found, the scheduler fails to load.
Note: All XML tag and attribute settings are case-sensitive. The convention that is used in this XML is that all tags are specified in uppercase, while attributes are specified in lowercase.

Scheduler fragment files

Instead of creating or updating a single, large scheduler XML file, you can define smaller scheduler configurations that are for specific parts of your implementation. For example, you can create individual scheduler configurations based on a payment scheme or on the FTM offering that you are using. Each of these smaller parts of the scheduler is configured in a scheduler fragment XML file.

You can use scheduler fragment XML files to load only those parts of the scheduler that are needed. If a scheduler fragment file that is specified in a <CONFIG> tag is not found as the scheduler XML is being loaded, the loading process continues. The missing scheduler fragment file is not loaded and Transaction Server logs a message to indicate that it was not found.

However, if you want the scheduler loading process to stop when a scheduler fragment XML file is not found, you can configure it to do that. If the <CONFIG> tag for the scheduler fragment XML file has its required attribute set to true and the specified file is not found, the scheduler load fails.

A scheduler fragment XML file can contain the tags and tag sets that are shown in the following table.
Table 2. Scheduler fragment XML file tags and tag sets
Tag Description
<?xml...> This tag specifies that the scheduler fragment is an XML document.
<SCHEDULER> This tag is not allowed in a scheduler fragment XML file.
<FRAGMENT> This tag set contains the entire scheduler fragment configuration.
<INCLUDE> This tag contains the include attribute value of a section tag set or a parameter that is to be included for this scheduler fragment. An include tag in a scheduler fragment applies only to the tags in that single fragment.
Only one value can be specified in each include tag. To include multiple section tag sets in the scheduler fragment, use multiple include tags.
Note: The value for this tag can include special characters, such as commas.

The include tag does not affect tasks and events that are not inside a section tag set in the scheduler fragment.

<PARAMETERSET> The parameterset tag is used to create a list of one or more parameter tags that the event tag sets can reference. This list is useful when multiple events need to use the same parameters and their values.

When a parameter set is referenced in an event tag set, the scheduler behaves the same as when those parameters are defined directly in that event tag set. If a parameter is defined in both the parameterset tag set and the event tag set, the value from the event tag set is used.

<TASK> Scheduler tasks are defined by using this tag set. In the example XML, the second task specification uses the background="yes" attribute setting. This attribute setting causes the task to run in the background. For more information on running tasks in the foreground and background, see Recurring tasks.
<EVENT> Scheduler events are defined by using this tag set. For more information about configuring events, see Event handler registration.
<SECTION> The section tag set is used to conditionally include one or more tasks, events, or sections in the scheduler XML that is loaded. This tag set has the attributes that are shown in the following list.
include
This attribute defines the value to specify in an include tag when the section is to be included in the scheduler XML that is loaded.
name
This attribute identifies the section in logs. Using a unique name for each section helps with any problem determination.
Note: Parameterset tags cannot be used in a section.
<CONFIG> This tag is not allowed in a scheduler fragment XML file.