# PreferencesController

PreferencesController swaps the server's settings by the clock. You keep two or more copies of the settings, each with a weekday and a time, and the server puts each in force when its time comes: slower transfers during office hours, a port closed at the weekend.

> [!NOTE]
> A server of version 27 built from the current sources comes with eleven plugins, and this one is not among them. Preferences still has its screen, which shows when the plugin's file is in the server's `plugins` folder, as it can be on a server that was upgraded from an earlier version, and where files that are not the server's own may be loaded: see [Writing a plugin](Plugins-Writing-Your-Own.md#getting-it-loaded). This page is written from that screen and the plugin's own help text; the plugin was not run.

## Settings

The tab **Snapshots**:

| Control | Is |
|---|---|
| **Weekday** | **All**, or one day from **Sun** to **Sat** |
| **Time** | hour, minute, **AM** or **PM** |
| **Create Snapshot** | copies the settings as they were last saved, and files the copy under that day and time |
| the list | the snapshots there are. **Remove** deletes the selected one. |

## How it works

When the time of a snapshot comes, the server replaces its settings with that copy, and they are in force. At the time of the next snapshot, that one is put in.

1. Set the server as it should be in the first period. Save.
2. Choose day and time for the start of that period. **Create Snapshot**.
3. Change the settings to what the second period needs. Save.
4. Choose the start of the second period. **Create Snapshot**.

There must be at least two: with one snapshot the settings would be swapped once and never back.

## Things to know

- **A snapshot is the whole of the settings.** Whatever you change in Preferences after making the snapshots is gone at the next swap. After any change that should last, make the snapshots again.
- **That includes users of other sections**: ports, plugins, bans, everything in Preferences.
- **For one setting, there are lighter ways.** A speed limit by time of day is a setting of its own: [Bandwidth](Prefs-General-Bandwidth.md), and a job on a schedule can do things at a time: [Schedules](Jobs-Schedules.md).
