Summary

The Arcana Scheduler API does not provide access to the holiday settings used by the Scheduler. Applications that need to modify these settings can do so by directly modifying the values stored in the Registry.

More Information

Beginning with version 2.3 of the Arcana Scheduler, holiday information is stored in the Registry under the key

HKEY_LOCAL_MACHINE\SOFTWARE\Arcana Development\Arcana Scheduler\Holidays

For versions of the Scheduler prior to 2.3, the settings are stored under

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\Arcana Scheduler\Holidays

Under this key a DWORD value is created for each holiday. The name of the value is the name of the holiday. The DWORD value encodes the holiday settings as described in the following sections.

After settings are changed, the Arcana Scheduler service must be restarted before it will recognize the new settings.

When a holiday is read from the Registry, its type can be determined as follows:

type=[value] AND &hf

Note: This article uses Visual Basic notation, where the prefix &h indicates a hexidecimal number.

Default Holidays

When the Arcana Scheduler is first installed, it uses a built-in list of predefined holidays, and no holidays are listed in the Registry. As long as no holidays are found in the Registry, the Scheduler uses its default list. If any holidays are found in the Registry, the Scheduler will use only those holidays stored in the Registry, and will not use its default list. 

Therefore if you still want the default holidays to be used along with your custom holidays, you must make sure they are in the Registry. The easiest way to do this is to run the Configuration Editor and create a new holiday. When you do this, the Configuration Editor will save the new holiday and all of the default holidays to the Registry. You can now delete the new holiday (directly in the Registry or through the Configuration Editor) and the default holidays will remain in the Registry.

Fixed Holidays (Type 0)

Fixed holidays occur on a specific [day] in a specific [month]. The DWORD value is calculated as:

([month] * &h1000) OR ([day] * &h10)

To decode the value:

month=([value] AND &hf000) / &h1000
day=([value] AND &hff0) / &h10

Floating Holidays (Type 1)

Floating holidays occur [offset] days after [n]th [weekday] of a [month], e.g., "2 days after the 3d Friday of May". The DWORD value is calculated as:

1 OR ([n] * &h10000) OR ([weekday] * &h1000) OR ([month] * &h100) OR ([offset] * &h10)

To decode the value:

n=([value] AND &hf0000) / &h10000
weekday=([value] AND &hf000) / &h1000
month=([value] AND &hf00) / &h100
offset=([value] AND &hf0) / &h10

One-Time Holidays (Type 2)

One-time holidays occur on a specific [day] of a specific [month] of a specific [year]. The DWORD value is calculated as follows:

2 OR ([month] * &h10000000) OR ([day] * &h100000) OR ([year] * &h10)

To decode the value:

month=([value] AND &hf0000000) / &h10000000
day=([value] AND &hff00000) / &h100000
year=([value] AND &hffff0) / &h10