> For the complete documentation index, see [llms.txt](https://docs.samita.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.samita.io/b2b-lock-password-protect/access-rules/weekly-schedule.md).

# Weekly schedule

Lock content on a recurring, per-day schedule with specific time windows — for example, every weekday 9am-5pm.

**Weekly schedule** matches visitors based on a recurring weekly pattern rather than a fixed calendar date: you turn specific days of the week on or off, and for each day you turn on, you can either make it active all day or set specific time windows (for example, 9am-5pm). It's a good fit for anything that repeats every week — locking checkout during a weekly flash-sale window, or restricting a live-drop page to only be reachable during your restock hours.

Like most access rules (aside from the action-based ones such as Passcode, Secret link, Subscribe, and Confirmation prompt), Weekly schedule can be set to match **If** the visitor arrives inside the scheduled window, or **Unless** they do — inverting it to match everything outside the schedule instead. See [Combining rules](/b2b-lock-password-protect/access-rules/combining-rules.md).

## Add the rule

1. Open **Locks** and create a new lock, or open an existing one to edit it.
2. Choose the content you want to protect. See [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md) for how rules fit into a lock.
3. Click the **Unlock rules** tab, then in the **Condition type** dropdown, select **Weekly schedule**.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-90c0c9f5c65cd553022bb097bdf4cffa8a3095be%2Fscreenshot-access-rules-picker-weekly-schedule.png?alt=media" alt="The Unlock rules tab with Weekly schedule selected in the Condition type dropdown."><figcaption><p>Select Weekly schedule from the Condition type dropdown on the Unlock rules tab.</p></figcaption></figure>

4. Turn each day on or off. For every day you turn on, choose whether it's active **all day** or set specific **start and end times** — you can add more than one time window on the same day if you need separate windows (for example, a morning slot and an evening slot).

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-82e7dd072ba3c27ba3386a56d4ef1a9e983ff724%2Fscreenshot-access-rules-weekly-schedule-config.png?alt=media" alt="The Weekly schedule rule settings, showing per-day toggles and start/end time fields."><figcaption><p>Turn on the days this rule should be active and set a time window for each one.</p></figcaption></figure>

5. Choose **If** or **Unless** depending on whether you want the lock active during the scheduled windows or outside them.
6. Click **Save**.

{% hint style="info" %}
Times you set here are evaluated in your **shop's own timezone**, not the visitor's local time — a 9am-5pm window means 9am-5pm in your store's timezone, regardless of where the visitor is browsing from.
{% endhint %}

{% hint style="warning" %}
**Edge case:** if your shop's timezone information is ever unavailable at the moment the rule is checked, the schedule falls back to evaluating times using the **visitor's own device time** instead. This is rare, but it means a visitor in a very different timezone from your shop could, in that fallback scenario, see the schedule apply at different local hours than you'd expect. Keep this in mind if you notice the schedule behaving inconsistently for visitors in different regions.
{% endhint %}

## Example: Open a wholesale support page during business hours

Suppose the page should be available from Monday to Friday, between 9:00 AM and 5:00 PM in your shop's timezone.

1. Select the **Wholesale support** page as the content to protect.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-4cbeef7c761540c58cf0f4e59394feb4a2382e83%2Fscreenshot-example-weekly-schedule-content.png?alt=media" alt="The Lock setup tab with Specific Page as the content type and the Wholesale support page listed under Restricted pages."><figcaption><p>Pick the page that should follow business hours.</p></figcaption></figure>

2. Add **Weekly schedule** and choose **If**. The rule shows your store's timezone and its current time — for example *America/New\_York (Friday, 06:09 AM GMT-4)* — so you can tell what "9:00" will mean.
3. Under **Select days**, turn on Monday through Friday and leave Saturday and Sunday off. Unselected days stay locked all day.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-ceec00a8a6436369d4dffc62b4e79caca176da52%2Fscreenshot-example-weekly-schedule-days.png?alt=media" alt="The Select days row with Monday through Friday highlighted as selected and Saturday and Sunday left unselected."><figcaption><p>Selected days are the only days access can open at all.</p></figcaption></figure>

4. Under **Set access hours**, each selected day offers **Set time periods** or **Allow all day**. Choose **Set time periods** and set **09:00** to **17:00** for every day.

{% hint style="info" %}
The first day you enable defaults to **Allow all day**, not to a time range — switch it to **Set time periods** or that day will stay open around the clock. New time periods default to 09:00–17:00.
{% endhint %}

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-b6fd328b9a8c6e31fbce9bf652f603d42ba7de56%2Fscreenshot-example-weekly-schedule-hours.png?alt=media" alt="The Set access hours section showing Monday with Set time periods selected and Start time 09:00, End time 17:00."><figcaption><p>Each day carries its own start and end time, and you can add more than one period per day.</p></figcaption></figure>

5. Leave the rule's **Redirect URL** empty.
6. Set the **Access denied message** to:

> Wholesale support is available Monday to Friday, 9:00 AM–5:00 PM.

{% hint style="info" %}
Weekly schedule shows only the **Access denied message** — there's no Guest message field, because the rule doesn't look at who the visitor is. See [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md#what-a-blocked-visitor-sees).
{% endhint %}

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-2c34c70d4c2dee2c6df2205570cfd16d2f869960%2Fscreenshot-example-weekly-schedule-message.png?alt=media" alt="The Messages card with a single Access denied message field set to the business-hours wording, and the Preview panel rendering it."><figcaption><p>One message field only, and the Preview panel confirms the wording before you save.</p></figcaption></figure>

7. Click **Save**.

### Result on the storefront

During the configured hours, visitors can open the Wholesale support page normally. Outside those hours, the page stays locked and displays the message above. Because the schedule uses the shop's timezone, every visitor is evaluated against the same business hours.

<figure><img src="https://27754559-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FF4qMYopXntYz9YgUqZSo%2Fuploads%2Fgit-blob-3705c8170902d7911984c64a4be32284b41ce824%2Fscreenshot-example-weekly-schedule-result.png?alt=media" alt="The locked Wholesale support page displaying the configured business-hours message."><figcaption><p>Outside the configured schedule, the visitor sees the Access denied message from this example.</p></figcaption></figure>

## Related docs

* [Access rules overview](/b2b-lock-password-protect/access-rules/overview.md)
* [Combining rules](/b2b-lock-password-protect/access-rules/combining-rules.md)
* [Date range](/b2b-lock-password-protect/access-rules/date-range.md)
* [Location](/b2b-lock-password-protect/access-rules/location.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.samita.io/b2b-lock-password-protect/access-rules/weekly-schedule.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
