DataImporter - Import Holidays



Importing the holidays will update the Service Hours and Holidays section in the Octopus options of a team. 

This section is particularly important when the Service Level Agreement (SLA) option is enabled. Because public holidays are then considered as outside the service hours of the service in the SLA calculations.



In an environment with more than one team with the same holidays, you can use the same import files and the same DOS command and simply modify the
/team parameter to quickly import into another team.


Links to articles related to importing and configuring the XML file:

What you need to know:

The reference template files (.xlsx et .xml) to prepare imports are included in the file.

Available fields to Import Holidays

Required Fields

  • Description - Text (100)
    • Name of the holiday. 
    • Note that the name of the holiday is not visible outside the option's window.
  • Date - Date and Time
    • Date of the holiday.
    • The format of the date must be compatible with the Octopus server settings, YYYY-MM-DD.
WARNING: The permission to administer Octopus is required to proceed with this type of import.

When the service targets are activated and the date import is done in the past, a recalculation of the SLAs will be made on the requests of the team in question.

It is very important to do this kind of import outside of service hours, as this could slow down Octopus.

Deleting holidays is normally done manually in the Octopus options. If an import causes problems and a deletion by batch is required, it can only be done using a script and charges will apply.


Configuration File Content (Holidays.xml)

The declaration of the source is done by indicating the Holiday value in the <Content> tag. 

NOTE: The XML file used as this example is for an import done from Excel 2007 or 2010. 

<?xml version="1.0" encoding="utf-8" ?>
     <Source Name="Holidays">
          <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Import\Holidays.xlsx;Extended Properties="Excel 12.0 Xml;HDR=YES";</ConnectionString>
<!-- Additional tags -->


To explain the tags used in all types and to find out more about the types of files, please refer to the XML Configuration File article. 

Help us improve our articles

Help us improve our articles