> For the complete documentation index, see [llms.txt](/llms.txt)

# Scheduling

Shared date-range and trigger infrastructure other features build on.




**About this demo**

The demo signs in automatically with an anonymous account. The account is shared across every demo in the showroom, so items and currency you get in one demo carry over to the others. Loading takes a moment. If the frame is too small, open the demo in a new tab.

## Overview

This demo shows the shared scheduling layer that answers "is this event open right now" with GS2-Schedule. Absolute schedules are fixed on the clock, so every visitor sees the same windows, and one that has ended is not listed. Relative schedules start when a player pulls a trigger, so each visitor gets a window of their own. You can pull, extend and clear the trigger with buttons and watch the window change.

## How to try it

1. **Event windows** lists the schedules that are open right now. The absolute **open-season (absolute)** shows its **Period** and, under **Ends in**, the time left until it ends in 2031. **closed-season** has already ended, so it is not listed.
1. Press **Pull** on **happy-hour** under **Start your window** to fire the trigger. **happy-hour** appears in **Your trigger** its **Window** runs 5 minutes (300 seconds) from the moment you pulled it, and **Expires in** counts down.
1. At the same time, the relative schedule **happy-hour (relative)** appears in **Event windows**, with the window your trigger opened under **Relative window** and the time until it closes under **Closes in**.
1. Each press of **Extend** in **Your trigger** adds 60 seconds to the window, and both **Expires in** and **Closes in** grow accordingly.
1. Press **Clear** to remove the trigger, which closes the **happy-hour** window. Left alone, it expires on its own after 5 minutes.

Your account is shared by every showroom demo in the same browser, so schedules used by other demos (such as the daily **guild-season**, or **ranking-contest** if you opened it in the ranking demo) can also appear in **Event windows**.

## GS2 services used

- [GS2-Schedule](/microservices/schedule/): GS2-Schedule holds the absolute and relative events (open-season, closed-season, happy-hour and others) and each player's triggers, and decides whether each event is open and for how long.
- [GS2-Exchange](/microservices/exchange/): Free GS2-Exchange rates define the trigger pull (300-second TTL), the 60-second extension and the clear as transactions against GS2-Schedule, and each button runs one of them.

## Use it in GS2 Studio

In GS2 Studio's Simple mode, open **Add features** and press **Add** on **Scheduling** to bring this feature into your own project. To point at the package directly, choose **Add from GitHub** and enter the package below.

```text
https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-schedule/packages/foundation-economy-schedule
```

- Owner: `gs2io`
- Repository: `gs2-studio-package`
- Subdirectory: `foundation-economy-schedule/packages/foundation-economy-schedule`

## Source code

- Demo project: <https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-schedule/live-demo>
- Feature package: <https://github.com/gs2io/gs2-studio-package/tree/main/foundation-economy-schedule>



